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