-
Notifications
You must be signed in to change notification settings - Fork 313
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
Update Dockerfile to use multi-stage builds #4746
Conversation
heliocastro
commented
Nov 24, 2021
•
edited
Loading
edited
- Uses multi-stage build to reduce final container
- Harmonize the base image to use same OpenJDK base from Eclipse Temurin and Ubuntu Focal LTS
- Make all tooling versions customizable through docker build args
- Each tooling is built in separate components, improving the process to add or remove specific tools
efbd9e1
to
dace4b4
Compare
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 some comments
c93e88f
to
998daa5
Compare
Dockerfile
Outdated
&& rbenv global ${RUBY_VERSION} \ | ||
&& gem install bundler cocoapods | ||
|
||
# Install 'CocoaPods'. As https://github.com/CocoaPods/CocoaPods/pull/10609 is needed but not yet released. |
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.
CocoaPods/CocoaPods#10609 was merged and I believe also released?
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.
Maybe, but i do not want change this since is this way on upstream Dockerfile. If we merge, then in later step i change to newer version of CocoaPods.
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.
Please see again how this is now done in the "legacy" Dockerfile
.
0106250
to
25d0408
Compare
This comment has been minimized.
This comment has been minimized.
ef532fa
to
dfe9dcc
Compare
3ce67da
to
1e59dca
Compare
c219a54
to
319991d
Compare
Signed-off-by: Helio Chissini de Castro <[email protected]>
Signed-off-by: Helio Chissini de Castro <[email protected]>
Signed-off-by: Helio Chissini de Castro <[email protected]>
- Python default version is 3.10.2 - Python2 can be optionally installed through build-arg PYTHON2_VERSION - Scancode build was removed in favor of pip based version Signed-off-by: Helio Chissini de Castro <[email protected]>
Signed-off-by: Helio Chissini de Castro <[email protected]>
Signed-off-by: Helio Chissini de Castro <[email protected]>
Signed-off-by: Helio Chissini de Castro <[email protected]>
Signed-off-by: Helio Chissini de Castro <[email protected]>
Signed-off-by: Helio Chissini de Castro <[email protected]>
- Update Ruby to 3.1.2 ( ssl3 ) - Update PHP composer to latest using installer - Update PIP - Move work user to Ort to be Batect compliant - Update NodeJS for current LTS Signed-off-by: Helio Chissini de Castro <[email protected]>
…mand line Signed-off-by: Helio Chissini de Castro <[email protected]>
Signed-off-by: Helio Chissini de Castro <[email protected]>
Signed-off-by: Helio Chissini de Castro <[email protected]>
- Move python packages to last stage to redice big copy and permission long chmod - Change android sdk permissions - Install pnpm ( missing ) - Update npm version - Fix pyenv version Signed-off-by: Helio Chissini de Castro <[email protected]>
- Add locale on image defaults to en_US.UTF-8 Signed-off-by: Helio Chissini de Castro <[email protected]>
Signed-off-by: Helio Chissini de Castro <[email protected]>
… poetry Signed-off-by: Helio Chissini de Castro <[email protected]>
- Fix android sdk folder permissions - Add buildx as default docker engine build and add implicit amd64 to build on non x86 based systems Signed-off-by: Helio Chissini de Castro <[email protected]>
a11d7ff
to
fd06d32
Compare
Cross-posting from Slack: Please don't merge this with a whopping 43 (!) commits in the history. I guess most of this should be squashable, or? |
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.
Sorry, the Git history in this PR is a mess. I'm blocking the merge until the TSC has decided on how to proceed.
@@ -202,7 +202,9 @@ ENV LANG=en_US.UTF-8 | |||
ENV LANGUAGE=en_US:en | |||
ENV LC_ALL=en_US.UTF-8 | |||
|
|||
RUN echo $LANG > /etc/locale.gen | |||
RUN echo $LANG > /etc/locale.gen \ |
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.
How is this related to "Make batect understand entrypoint"?
@mnonnenmacher @MarcelBochtler @fviernau could you live with the Git history in this PR? |
@sschuberth I would not merge it like this, because just from a short look I see so many issues:
And this is not the complete list. I understand that this PR was worked on for almost a year now, and that this was probably a bit frustrating. So I want to thank @heliocastro for being to persistent with your efforts to improve our Docker setup. But nevertheless this PR should follow our standards. We have put a lot of effort into maintaining a clean Git history for this project because it brings a lot of benefits, and I would not like to ignore this now just because someone has an urge to merge these changes. My suggestion to move this forward in a clean way would be to squash all changes into just a few commits, so that the PR can be reviewed properly, for example:
@sschuberth @fviernau @MarcelBochtler Does one of you maybe have a better idea how to clean this up? And as a general comment, if you work on a contribution that takes a long time, to a project with mandatory code review, it is super important to rebase your changes on top of the current main branch on a regular basis. Yes, this can be a lot of work, but it is the responsibility of the author to make sure that their changes are in a reviewable state. |
Looks like a clean-up was already done in #5760. I'll close this PR in favor of that one. Let's continue the discussion over there. |