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 option to specify base image for cli jar command #2972

Merged
merged 10 commits into from
Jan 8, 2021

Conversation

mpeddada1
Copy link
Contributor

@mpeddada1 mpeddada1 commented Jan 6, 2021

Closes #2923
This PR adds the --from option to the jib cli jar subcommand. It will be used to specify the desired base image.

@google-cla google-cla bot added the cla: yes label Jan 6, 2021
@mpeddada1 mpeddada1 marked this pull request as ready for review January 7, 2021 18:03
@mpeddada1 mpeddada1 requested a review from a team January 7, 2021 18:03
throws IOException, InvalidImageReferenceException {

// Use distroless as the base image.
JibContainerBuilder containerBuilder = Jib.from("gcr.io/distroless/java");
// Use distroless as the default base image.
Copy link
Member

Choose a reason for hiding this comment

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

I think here we should try to check if the jar is java8 or java11 and chose the right distroless? (perhaps in a followup PR)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup, good point - we have an issue for this #2871. Will make this change in the next PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[jib-cli-jar] Add option to specify base image in jib cli jar command
3 participants