File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
1
# Stage for building the manage binary within Docker
2
- FROM docker.io/golang:1.24 AS builder
2
+ FROM docker.io/library/ golang:1.24 AS builder
3
3
ARG TARGETOS
4
4
ARG TARGETARCH
5
5
@@ -17,7 +17,7 @@ COPY api/ api/
17
17
COPY internal/ internal/
18
18
19
19
# Build
20
- # the GOARCH has not a default value to allow the binary be built according to the host where the command
20
+ # the GOARCH has no default value to allow the binary be built according to the host where the command
21
21
# was called. For example, if we call make docker-build in a local env which has the Apple Silicon M1 SO
22
22
# the docker BUILDPLATFORM arg will be linux/arm64 when for Apple x86 it will be linux/amd64. Therefore,
23
23
# by leaving it empty we can ensure that the container and binary shipped on it will have the same platform.
@@ -26,7 +26,7 @@ RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o ma
26
26
# Default final stage - builds from scratch
27
27
# Use distroless as minimal base image to package the manager binary
28
28
# Refer to https://github.com/GoogleContainerTools/distroless for more details
29
- FROM gcr.io/distroless/static:nonroot as final
29
+ FROM gcr.io/distroless/static:nonroot AS final
30
30
WORKDIR /
31
31
COPY --from=builder /workspace/manager .
32
32
USER 65532:65532
@@ -36,7 +36,7 @@ ENTRYPOINT ["/manager"]
36
36
FROM gcr.io/distroless/static:nonroot AS final_prebuilt
37
37
ARG TARGETARCH
38
38
WORKDIR /
39
- COPY manager-${TARGETARCH} manager
39
+ COPY --chmod=0755 manager-${TARGETARCH} manager
40
40
USER 65532:65532
41
41
ENTRYPOINT ["/manager" ]
42
42
You can’t perform that action at this time.
0 commit comments