Skip to content

Commit 6f94ddd

Browse files
committed
chore(build): allow image build to reuse cached go module dependencies
1 parent ec79304 commit 6f94ddd

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ RUN apk add --no-cache gcc musl-dev linux-headers
1414

1515
WORKDIR /backend-build
1616

17+
COPY go.* ./
18+
RUN go mod download
19+
1720
COPY . .
1821
COPY --from=frontend /frontend-build/public ./web/public
1922

@@ -22,10 +25,9 @@ RUN go build -o eth-faucet -ldflags "-w -s"
2225
FROM alpine
2326

2427
RUN apk add --no-cache ca-certificates
25-
WORKDIR /app
2628

27-
COPY --from=backend /backend-build/eth-faucet .
29+
COPY --from=backend /backend-build/eth-faucet /app/eth-faucet
2830

2931
EXPOSE 8080
3032

31-
ENTRYPOINT ["./eth-faucet"]
33+
ENTRYPOINT ["/app/eth-faucet"]

0 commit comments

Comments
 (0)