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

Add Dockerfile template for distroless in native mode #14315

Merged
merged 2 commits into from
Feb 4, 2021

Conversation

maxday
Copy link
Contributor

@maxday maxday commented Jan 15, 2021

A PR to build a distroless image has been merged here : quarkusio/quarkus-images#118
This PR adds a new Dockerfile template to showcase how to use it.

Question :
Do we really need graalvm version + java version in the image tag name ? Since this is a distroless version, java is not installed in the image so it may be confusing.

A next step could be to update the guide. What do you think ?

cc @cescoffier and @matthyx

@ghost ghost added area/codestarts area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins labels Jan 15, 2021
COPY {buildtool.build-dir}/*-runner /application

EXPOSE 8080
USER 1001
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are only 3 users in distroless passwd file: root (0), nobody (65534) and nonroot (65532)
https://github.com/GoogleContainerTools/distroless/blob/master/base/testdata/base.yaml#L40

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nonroot should be good.
nobody might be too limited.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@matthyx
Copy link

matthyx commented Jan 15, 2021

+1 here
Regarding the tag, distroless images are only tagged with the debian version they are based on (which I didn't fix in https://github.com/quarkusio/quarkus-images) and the only reason I put one was to make build-images.java happy.

However it may make sense to keep the tag as future graalVM version might require more/fewer libs to run which could create issues for our users.

@cescoffier
Copy link
Member

About the tag, we can fix this in quarkus-images, as we do for the binary s2i (using the permanent 1.0 flag)

@maxday
Copy link
Contributor Author

maxday commented Feb 2, 2021

Since the PR https://github.com/quarkusio/quarkus-images/pull/121/files has been merged to use 1.0 I think this PR is ready to review @cescoffier
Thanks !

@matthyx
Copy link

matthyx commented Feb 2, 2021

LGTM

@gsmet gsmet merged commit cdbb5db into quarkusio:master Feb 4, 2021
@ghost ghost added this to the 1.12 - master milestone Feb 4, 2021
@gsmet
Copy link
Member

gsmet commented Feb 4, 2021

@ia3andy do we have to maintain the ftl templates or could we get rid of them now? Or at least decide we don't add new ones?

@ia3andy
Copy link
Contributor

ia3andy commented Feb 8, 2021

@gsmet I think we can drop the legacy support now, we need a PR for this. I believe @aloubyansky has removed it on his new platform branch, but I am not sure when it's going to get in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/codestarts area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants