-
Notifications
You must be signed in to change notification settings - Fork 5
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
feature: minimize container image #28
feature: minimize container image #28
Conversation
Rearrange Dockerfile so it creates as little layers as possible and removes everything temporary in the same RUN step as it is downloaded. Like this these downloads are never in any layer and just hidden by deleting them later.
* does not play nice with multi platform * should not contain anything after the build (apt-get clean)
Dockerfile
Outdated
# install nodejs | ||
curl -fsSL https://deb.nodesource.com/setup_18.x -o nodesource_setup.sh && \ | ||
bash nodesource_setup.sh && \ | ||
apt install nodejs && \ | ||
# install prince |
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.
@simar0at Can you please check indentation here and in the following lines?
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.
just realised that the apt install nodejs && \
was dropped, can’t recall if or why this was necessary… ideas?
Beside the indentations, looks good to me (we can fix it later if needed. GH UI seems to be contradicting any fixing attempts). Tested locally as well, runs fine. |
Will let @bwbohl have another look. |
I created a PR with the fixed against @simar0at ’s I was wondering whether we should also move the download of ANT, Saxon, and Xerces (line 27) into the RUN (line 35). Doing so, we would drop another layer, and this should further reduce image size, correct? |
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.
created a PR with the corresponding indentation
Fix/indentation
Downloading in a big |
Deleting the zips after deploying them would be absolutely fine |
Either the logic for getting temurin is broken or this is a one off and just rerunning will du. |
Rerun was fine |
@bwbohl Ready to merge? |
Thank you @simar0at for this helpful contribution! |
Rearrange Dockerfile so it creates as little layers as possible and removes everything temporary in the same RUN step as it is downloaded. Like this these downloads are never in any layer and just hidden by deleting them later.