Skip to content
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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

santinoncs
Copy link

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!

@santinoncs
Copy link
Author

/assign @JorritSalverda

RUN go mod download \
&& go build ./...

FROM debian:buster-slim
Copy link
Collaborator

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.

Copy link
Author

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 \
Copy link
Collaborator

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.

Dockerfile Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants