no custom mounts
Some checks failed
Build and Publish / BuildAndDeployAmd64 (push) Failing after 6s
Build and Publish / BuildAndDeployArm64 (push) Failing after 7s

This commit is contained in:
2025-11-25 19:44:47 +01:00
parent fc678797ba
commit 8d976dd250

View File

@@ -38,8 +38,7 @@ ENV CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH}
# Dependency caching
COPY go.mod go.sum ./
RUN --mount=type=cache,target=/go/pkg/mod \
go mod download
RUN go mod download
# Copy full source (relay on .dockerignore to prune)
COPY . .
@@ -52,22 +51,19 @@ COPY . .
# proto/*.proto
# Build with minimal binary size and embedded metadata
RUN --mount=type=cache,target=/go/build-cache \
go build -trimpath -ldflags="-s -w \
RUN go build -trimpath -ldflags="-s -w \
-X main.Version=${VERSION} \
-X main.GitCommit=${GIT_COMMIT} \
-X main.BuildDate=${BUILD_DATE}" \
-o /out/go-cart-actor ./cmd/cart
RUN --mount=type=cache,target=/go/build-cache \
go build -trimpath -ldflags="-s -w \
RUN go build -trimpath -ldflags="-s -w \
-X main.Version=${VERSION} \
-X main.GitCommit=${GIT_COMMIT} \
-X main.BuildDate=${BUILD_DATE}" \
-o /out/go-cart-backoffice ./cmd/backoffice
RUN --mount=type=cache,target=/go/build-cache \
go build -trimpath -ldflags="-s -w \
RUN go build -trimpath -ldflags="-s -w \
-X main.Version=${VERSION} \
-X main.GitCommit=${GIT_COMMIT} \
-X main.BuildDate=${BUILD_DATE}" \