-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: reduce size of docker image by leveraging a multi-stage build #180
fix: reduce size of docker image by leveraging a multi-stage build #180
Conversation
8f7598a
to
cfc5d8b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for making a PR! One quick question
The current docker image builds to about 2.7GB on my machine, this can be improved through leveraging multi-stage builds in docker. With this commit, the new image size will be less than 200mb and the necessary binaries are copied to /usr/local/bin Closes viaduct-ai#175
cfc5d8b
to
a21e71a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -4,7 +4,8 @@ ARG GO_VERSION="1.19" | |||
#--------Build KSOPS and Kustomize-----------# | |||
#--------------------------------------------# | |||
|
|||
FROM golang:$GO_VERSION | |||
# Stage 1: Build KSOPS and Kustomize | |||
FROM golang:$GO_VERSION AS builder | |||
|
|||
LABEL org.opencontainers.image.source="https://github.com/viaduct-ai/kustomize-sops" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The LABEL
needs to be moved down to the final image
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addresses feedback left in viaduct-ai#180
Addresses feedback left in #180
Hi, this PR has made the Custom ArgoCD Image doc outdated: https://github.com/viaduct-ai/kustomize-sops#custom-argo-cd-w-ksops-dockerfile |
Thanks for flagging @Piroddi - I'll push a PR to fix the docs today. |
This commit changes the version of both argocd and ksops to newer versions and changes the paths to reflect what is configured in the new slim docker image introduced in viaduct-ai#180 ArgoCD v2.6.7 is the latest version available on the argoproj docker registry at the time of this commit.
This commit changes the version of both argocd and ksops to newer versions and changes the paths to reflect what is configured in the new slim docker image introduced in #180 ArgoCD v2.6.7 is the latest version available on the argoproj docker registry at the time of this commit.
The current docker image builds to about 2.7GB on my machine, this
can be improved through leveraging multi-stage builds in docker.
With this commit, the new image size will be less than 200mb and
the necessary binaries are copied to /usr/local/bin
Closes #175