Skip to content

Conversation

@tgxworld
Copy link
Contributor

@tgxworld tgxworld commented Dec 17, 2024

This adds an additional layer of 30mb for no reason. We don't need to be
running the latest version of rubygems all the time.

tgxworld ~/work/discourse_docker [skip_updating_ruby_gems] $ docker history --no-trunc discourse/base:release | grep 'gem update --system'
<missing>                                                                 5 hours ago    RUN |1 DEBIAN_RELEASE=bookworm /bin/sh -c echo 'gem: --no-document' >> /usr/local/etc/gemrc &&    gem update --system # buildkit                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                29.8MB    buildkit.dockerfile.v0

Even if we need to update rubygems, it should be updated in https://github.com/discourse/docker-ruby

This adds an additional layer of 20mb for no reason. We don't need to be
running the latest version of rubygems all the time.

Even if we need to update rubygems, it should be updated in https://github.com/discourse/docker-ruby
ADD install-oxipng /tmp/install-oxipng
RUN /tmp/install-oxipng

RUN echo 'gem: --no-document' >> /usr/local/etc/gemrc &&\
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note that the ruby image that this image is based off already does this: https://github.com/discourse/docker-ruby/blob/832c4cbc71ae9ad37b7206d83b73e473472a2e30/Dockerfile#L31-L34

@tgxworld tgxworld merged commit b375a71 into main Dec 17, 2024
5 checks passed
@tgxworld tgxworld deleted the skip_updating_ruby_gems branch December 17, 2024 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants