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
1313WORKDIR /fn
1414
1515# 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'.
1618ENV CGO_ENABLED=0
1719
1820# We run go mod download in a separate step so that we can cache its results.
@@ -38,7 +40,7 @@ RUN --mount=target=. \
3840
3941# Produce the Function image. We use a very lightweight 'distroless' image that
4042# 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
4244WORKDIR /
4345COPY --from=build /function /function
4446EXPOSE 9443
You can’t perform that action at this time.
0 commit comments