-
Notifications
You must be signed in to change notification settings - Fork 72
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
Include two stages docker #81
base: main
Are you sure you want to change the base?
Conversation
/assign @JorritSalverda |
RUN go mod download \ | ||
&& go build ./... | ||
|
||
FROM debian:buster-slim |
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 runtime image should still be scratch
in order to reduce attack surface and size.
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.
I could not make it run with scratch. I figure out that for some reason does not like the
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
Dockerfile
Outdated
&& apt-get -qqq -y install ca-certificates\ | ||
&& update-ca-certificates | ||
|
||
RUN go mod download \ |
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.
Although it's nice to be able to build the application inside the dockerfile so you can run all of it locally, I'd rather do this inside the separate stage in the .estafette.yaml
file, because it gives better visibility inside the Estafette GUI of how much time it takes, etc.
When building image, you need a ca-certificates.
I think this could be a good improve in order to not need to got this file in local.
Thanks!