Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangpengcheng committed May 7, 2024
1 parent ad85b14 commit 3a54119
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Build the manager binary
FROM golang:1.22.2-bullseye as builder

WORKDIR /workspace/api
COPY api/ .
RUN go mod download

WORKDIR /workspace
# Copy the Go Modules manifests
COPY go.mod go.mod
Expand All @@ -11,7 +15,6 @@ RUN go mod download

# Copy the go source
COPY main.go main.go
COPY api/ api/
COPY pkg/ pkg/
COPY controllers/ controllers/
COPY utils/ utils/
Expand Down
5 changes: 4 additions & 1 deletion redhat.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Build the manager binary
FROM golang:1.22.2-bullseye as builder

WORKDIR /workspace/api
COPY api/ .
RUN go mod download

WORKDIR /workspace
# Copy the Go Modules manifests
COPY go.mod go.mod
Expand All @@ -11,7 +15,6 @@ RUN go mod download

# Copy the go source
COPY main.go main.go
COPY api/ api/
COPY pkg/ pkg/
COPY controllers/ controllers/
COPY utils/ utils/
Expand Down

0 comments on commit 3a54119

Please sign in to comment.