From 205721d3de7e267ed2a2569c310e4e10e39c9cde Mon Sep 17 00:00:00 2001 From: Simon Emms Date: Sat, 24 Aug 2024 20:57:47 +0000 Subject: [PATCH] feat(golang-cobra): shrink the Dockerfile binary through UPX --- golang-cobra/{{ cookiecutter.project_name }}/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/golang-cobra/{{ cookiecutter.project_name }}/Dockerfile b/golang-cobra/{{ cookiecutter.project_name }}/Dockerfile index 541a55e..814534a 100644 --- a/golang-cobra/{{ cookiecutter.project_name }}/Dockerfile +++ b/golang-cobra/{{ cookiecutter.project_name }}/Dockerfile @@ -13,8 +13,8 @@ RUN go build \ -o /app/app ENTRYPOINT /app/app -FROM alpine -RUN apk --no-cache add ca-certificates +FROM scratch WORKDIR /app +COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt COPY --from=builder /app/app /app ENTRYPOINT [ "/app/app" ]