File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ FROM --platform=${BUILDPLATFORM} golang:${GO_VERSION} AS build
13
13
WORKDIR /fn
14
14
15
15
# Most functions don't want or need CGo support, so we disable it.
16
+ # If CGo support is needed make sure to also change the base image to one that
17
+ # includes glibc, like 'distroless/base'.
16
18
ENV CGO_ENABLED=0
17
19
18
20
# We run go mod download in a separate step so that we can cache its results.
@@ -38,7 +40,7 @@ RUN --mount=target=. \
38
40
39
41
# Produce the Function image. We use a very lightweight 'distroless' image that
40
42
# does not include any of the build tools used in previous stages.
41
- FROM gcr.io/distroless/base-debian11 AS image
43
+ FROM gcr.io/distroless/static-debian12:nonroot AS image
42
44
WORKDIR /
43
45
COPY --from=build /function /function
44
46
EXPOSE 9443
You can’t perform that action at this time.
0 commit comments