Skip to content

Commit 7d712d0

Browse files
committed
Rework Dockerfile
- Cache dependencies - Upload only the files needed
1 parent 57e3ec2 commit 7d712d0

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

Dockerfile

+9-2
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,17 @@ ENV CGO_ENABLED=0
99
ENV GOOS=linux
1010
ENV GOARCH=amd64
1111

12+
# Dependencies
1213
WORKDIR /src
13-
COPY . .
14-
WORKDIR /src/cmd/ext-proc
14+
COPY go.mod go.sum ./
1515
RUN go mod download
16+
17+
# Sources
18+
COPY cmd ./cmd
19+
COPY pkg ./pkg
20+
COPY internal ./internal
21+
COPY api ./api
22+
WORKDIR /src/cmd/ext-proc
1623
RUN go build -o /ext-proc
1724

1825
## Multistage deploy

0 commit comments

Comments
 (0)