Skip to content

Update centos7 rpmpkg to use ruby 2.5#610

Merged
mthalman merged 6 commits into
mainfrom
wtgodbe/ruby2.5
May 5, 2022
Merged

Update centos7 rpmpkg to use ruby 2.5#610
mthalman merged 6 commits into
mainfrom
wtgodbe/ruby2.5

Conversation

@wtgodbe
Copy link
Copy Markdown
Member

@wtgodbe wtgodbe commented Apr 26, 2022

Attempt to update the centos7 image to fix dotnet/aspnetcore#37406.

Copy link
Copy Markdown
Contributor

@dougbu dougbu left a comment

Choose a reason for hiding this comment

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

I don't know whether they're better nor whether all remain compatible w/ CentOS 7 but rh-ruby26*, rh-ruby27*, and rh-ruby30 packages are available.

Copy link
Copy Markdown
Member

@mthalman mthalman left a comment

Choose a reason for hiding this comment

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

Can you return the Dockerfile back to its original format of including multiple commands in one RUN instruction?

  1. It's easier to read, especially when installing multiple packages.
  2. It's more efficient for image size. Each instruction causes the file modifications to be written to a separate layer. So if you execute yum clean all in its own instruction, you end up having the files cleaned in the final container but all the files that were deleted still exist in the prior layers of the image and lead to unnecessary image bloat. You can read up more on Dockerfile best practices at https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#run.

@wtgodbe
Copy link
Copy Markdown
Member Author

wtgodbe commented May 3, 2022

@mthalman I separated it out to try to find which install command was failing:

Step 7/9 : RUN gem install --no-document git:1.7.0 ffi:1.12.2
---> Running in 22bbc5163ece
/bin/sh: gem: command not found

does RUN yum --enablerepo=centos-sclo-rh -y install rh-ruby25-rubygems not achieve that?

@mthalman
Copy link
Copy Markdown
Member

mthalman commented May 4, 2022

@mthalman I separated it out to try to find which install command was failing:

If you're still working on debugging the Dockerfile, it would be better to mark this as a draft PR. In addition, it would be better to install Docker Desktop on your local machine and build the Dockerfile locally to diagnose issues.

Step 7/9 : RUN gem install --no-document git:1.7.0 ffi:1.12.2
---> Running in 22bbc5163ece
/bin/sh: gem: command not found

does RUN yum --enablerepo=centos-sclo-rh -y install rh-ruby25-rubygems not achieve that?

I don't have much experience in this area. Looking at the other Dockerfiles in this repo that use gem, I see they just install rubygems.

@wtgodbe wtgodbe marked this pull request as draft May 4, 2022 20:30
@wtgodbe wtgodbe marked this pull request as ready for review May 4, 2022 21:22
@wtgodbe
Copy link
Copy Markdown
Member Author

wtgodbe commented May 4, 2022

Ok, should be working now

@mthalman mthalman merged commit d0fa36f into main May 5, 2022
@wtgodbe wtgodbe deleted the wtgodbe/ruby2.5 branch May 5, 2022 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Undo workarounds added to dockerfile while updating to 7.0 SDK

3 participants