Skip to content
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

docker: Switch to using ubi8/ubi-minimal #55467

Merged
merged 1 commit into from
Oct 13, 2020

Conversation

jlinder
Copy link
Collaborator

@jlinder jlinder commented Oct 12, 2020

Before: We were using ubi8/ubi because we hadn't figured out how to get
tzdata into the ubi8/ubi-minimal image.

Why: The ubi8/ubi-minimal image is smaller and now has everything we
need.

Now: The docker image is based on ubi8/ubi-minimal. The required tzdata
files are acquired by rpm erasing the tzdata package and then
reinstalling it (there is no microdnf reinstall command in the current
image).

Release note (backward-incompatible change): The docker image is now
based on RedHat's ubi8/ubi-minimal image (instead of ubi8/ubi). This
image is smaller.

@jlinder jlinder requested a review from bdarnell October 12, 2020 22:03
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Contributor

@bdarnell bdarnell left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @bdarnell and @jlinder)


build/deploy/Dockerfile, line 1 at r1 (raw file):

FROM registry.access.redhat.com/ubi8/ubi-minimal AS builder

Maybe just use the non-minimal UBI as the builder? (unless you want to use one of the tricks from my other comment to avoid the separate builder image)


build/deploy/Dockerfile, line 11 at r1 (raw file):

# For deployment, we need the following installed (they are installed
# by default in RedHat UBI standard):

This comment could use an update.

Before: We were using ubi8/ubi because we hadn't figured out how to get
tzdata into the ubi8/ubi-minimal image.

Why: The ubi8/ubi-minimal image is smaller and now has everything we
need.

Now: The docker image is based on ubi8/ubi-minimal. The required tzdata
files are acquired by rpm erasing the tzdata package and then
reinstalling it (there is no `microdnf reinstall` command in the current
image).

Release note (backward-incompatible change): The docker image is now
based on RedHat's ubi8/ubi-minimal image (instead of ubi8/ubi). This
image is smaller.
Copy link
Collaborator Author

@jlinder jlinder left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @bdarnell)


build/deploy/Dockerfile, line 1 at r1 (raw file):

Previously, bdarnell (Ben Darnell) wrote…

Maybe just use the non-minimal UBI as the builder? (unless you want to use one of the tricks from my other comment to avoid the separate builder image)

I switched to using the rpm erase hack you noted in #54812.


build/deploy/Dockerfile, line 11 at r1 (raw file):

Previously, bdarnell (Ben Darnell) wrote…

This comment could use an update.

Updated.

@jlinder
Copy link
Collaborator Author

jlinder commented Oct 13, 2020

Josh and Joel, The change to using the ubi8/ubi-minimal image comes with a change in package manager that is installed. Yum is not available. The replacement is microdnf. Wanted to give you a heads up for when this lands.

@jlinder
Copy link
Collaborator Author

jlinder commented Oct 13, 2020

TFTR!

bors r=bdarnell

@DuskEagle
Copy link
Member

Tested on our Helm chart and on CC, both work as expected with this change.

@craig
Copy link
Contributor

craig bot commented Oct 13, 2020

Build succeeded:

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.

4 participants