Skip to content
This repository has been archived by the owner on Jun 29, 2020. It is now read-only.

Issue 113 keys multi build and 103 slim JDKs (with base image) #122

Closed

Conversation

gregw
Copy link
Contributor

@gregw gregw commented Nov 27, 2019

This is a variant of #121 to solve #113 and #103

It creates a base 9.4-jdk13 images, which all the other 9.4 variants are based off.

gregw added 12 commits November 25, 2019 09:34
Fix appropriate#113 by creating multistage builds that first download keys.
Also took opportunity to reorder Dockerfiles to reduce complexity and size.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
Signed-off-by: Greg Wilkins <gregw@webtide.com>
Signed-off-by: Greg Wilkins <gregw@webtide.com>
Cleaned up jetty-home usage
Tested the approach for slim JDKs by adding another multi stage to do the validation, since
gpg is not available in slim builds

Signed-off-by: Greg Wilkins <gregw@webtide.com>
Signed-off-by: Greg Wilkins <gregw@webtide.com>
Signed-off-by: Greg Wilkins <gregw@webtide.com>
Also ran update of 9.2 and 9.3

Signed-off-by: Greg Wilkins <gregw@webtide.com>
Signed-off-by: Greg Wilkins <gregw@webtide.com>
The update.sh script will copy the Dockerfile-9.4 template
and modify it as needed.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
Signed-off-by: Greg Wilkins <gregw@webtide.com>
Signed-off-by: Greg Wilkins <gregw@webtide.com>
Signed-off-by: Greg Wilkins <gregw@webtide.com>
Signed-off-by: Greg Wilkins <gregw@webtide.com>
@gregw gregw requested a review from md5 November 27, 2019 23:13
ENV PATH $JETTY_HOME/bin:$PATH

COPY --from=jetty:9.4-jdk13 $JETTY_HOME $JETTY_HOME
COPY --from=jetty:9.4-jdk13 $JETTY_BASE $JETTY_BASE
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think that copying from external image is the best approach.
It means you should have it built already before doing other builds. Docker will not pull it automagically.
The issue is seen in Travis, it was unable to find non-existing image. And there is no way to build particular images in isolation.

I suggest to include all the commands to build basic Jetty 9.4 container (let's assume on openjdk:latest) as a first stage of all Dockerfiles for creating images with 9.4. Since you're going to use templating with the script, it is rather easy to do.
This way Dockerfiles would became independent of each other, and layers cache would be used as well to speed up the process when building multiple images (in CI).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So you are saying that #121 is the best approach?

Copy link
Contributor

Choose a reason for hiding this comment

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

Seems to be so, I haven't looked too deep on it in the first place... Great minds think alike 😄

@gregw gregw closed this Dec 16, 2019
@gregw gregw deleted the issue-113-keys-multi-build-2 branch February 28, 2020 08:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants