Skip to content

Commit

Permalink
chore(build): allow image build to reuse cached go module dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
iczc committed Oct 16, 2021
1 parent ec79304 commit 6f94ddd
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ RUN apk add --no-cache gcc musl-dev linux-headers

WORKDIR /backend-build

COPY go.* ./
RUN go mod download

COPY . .
COPY --from=frontend /frontend-build/public ./web/public

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

RUN apk add --no-cache ca-certificates
WORKDIR /app

COPY --from=backend /backend-build/eth-faucet .
COPY --from=backend /backend-build/eth-faucet /app/eth-faucet

EXPOSE 8080

ENTRYPOINT ["./eth-faucet"]
ENTRYPOINT ["/app/eth-faucet"]

0 comments on commit 6f94ddd

Please sign in to comment.