Skip to content

Commit

Permalink
modified Dockerfile source images to use smaller base images
Browse files Browse the repository at this point in the history
  • Loading branch information
bradkwadsworth-mw committed Dec 27, 2024
1 parent 6ffcd8f commit 90d3d6c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# We use the latest Go 1.x version unless asked to use something else.
# The GitHub Actions CI job sets this argument for a consistent Go version.
ARG GO_VERSION=1
ARG BASE_IMAGE=kcllang/kcl
ARG BASE_IMAGE=debian:bookworm-slim

# Setup the base environment. The BUILDPLATFORM is set automatically by Docker.
# The --platform=${BUILDPLATFORM} flag tells Docker to build the function using
Expand Down Expand Up @@ -33,7 +33,7 @@ ARG TARGETARCH
RUN --mount=target=. \
--mount=type=cache,target=/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build \
GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -o /function .
GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -ldflags "-w -s" -o /function .

# Produce the Function image. We use a very lightweight 'distroless' image that
# does not include any of the build tools used in previous stages.
Expand Down

0 comments on commit 90d3d6c

Please sign in to comment.