Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
denpeshkov authored Feb 21, 2024
1 parent c2deac0 commit 75ae35c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1
ARG GO_VERSION=1.22-rc
ARG GOLANGCI_LINT_VERSION=latest-alpine
ARG GOLANGCI_LINT_VERSION=v1.55.2

FROM --platform=$BUILDPLATFORM golang:${GO_VERSION} AS deps
ENV GOMODCACHE=/go/pkg/mod/
Expand All @@ -14,6 +14,8 @@ RUN --mount=type=cache,target=${GOMODCACHE} \
FROM deps AS build
ARG TARGETOS
ARG TARGETARCH
WORKDIR /src
COPY . .
RUN --mount=type=cache,target=${GOMODCACHE} \
--mount=type=cache,target=${GOCACHE} \
CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build ./...
CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build ./...

0 comments on commit 75ae35c

Please sign in to comment.