From 4def07ecf4dcf41294d9076b736e127f2121979c Mon Sep 17 00:00:00 2001 From: Peefy Date: Thu, 24 Oct 2024 20:19:31 +0800 Subject: [PATCH] chore: use debian:slim as the base image Signed-off-by: Peefy --- Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index d8e8d37..aeb7536 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,15 +13,15 @@ ENV CGO_ENABLED=0 RUN --mount=type=cache,target=/go/pkg --mount=type=cache,target=/root/.cache/go-build GOOS=${TARGETOS} GOARCH=${TARGETARCH} make build -FROM gcr.io/distroless/base-debian11 AS image +FROM debian:slim AS image COPY --from=build /src/bin/kcl /usr/local/bin/kcl # Show KCL version -RUN /usr/local/bin/kcl version +RUN kcl version # Enable kcl works fine -RUN echo 'a=1' | /usr/local/bin/kcl run - +RUN echo 'a=1' | kcl run - # Install Git Dependency -RUN apt-get update && apt-get install git -y && rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install git -y # The reason for doing this below is to prevent the # container from not having write permissions. ENV KCL_LIB_HOME=/tmp