-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Conversation
jib-cli/src/test/java/com/google/cloud/tools/jib/cli/jar/JarFilesTest.java
Outdated
Show resolved
Hide resolved
jib-cli/src/main/java/com/google/cloud/tools/jib/cli/jar/JarFiles.java
Outdated
Show resolved
Hide resolved
jib-cli/src/test/java/com/google/cloud/tools/jib/cli/jar/JarFilesTest.java
Outdated
Show resolved
Hide resolved
jib-cli/src/main/java/com/google/cloud/tools/jib/cli/buildfile/BuildFiles.java
Outdated
Show resolved
Hide resolved
jib-cli/src/main/java/com/google/cloud/tools/jib/cli/ContainerBuilders.java
Outdated
Show resolved
Hide resolved
jib-cli/src/main/java/com/google/cloud/tools/jib/cli/ContainerBuilders.java
Outdated
Show resolved
Hide resolved
jib-cli/src/integration-test/java/com/google/cloud/tools/jib/cli/JarCommandTest.java
Outdated
Show resolved
Hide resolved
jib-cli/src/main/java/com/google/cloud/tools/jib/cli/buildfile/BuildFiles.java
Outdated
Show resolved
Hide resolved
jib-cli/src/test/java/com/google/cloud/tools/jib/cli/ContainerBuildersTest.java
Outdated
Show resolved
Hide resolved
throws IOException, InvalidImageReferenceException { | ||
|
||
// Use distroless as the base image. | ||
JibContainerBuilder containerBuilder = Jib.from("gcr.io/distroless/java"); | ||
// Use distroless as the default base 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.
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)
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.
Yup, good point - we have an issue for this #2871. Will make this change in the next PR.
Closes #2923
This PR adds the
--from
option to the jib cli jar subcommand. It will be used to specify the desired base image.