Skip to content

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

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
jlinder:jhl/ubi8-minimal
Oct 13, 2020
Merged

docker: Switch to using ubi8/ubi-minimal#55467
craig[bot] merged 1 commit intocockroachdb:masterfrom
jlinder:jhl/ubi8-minimal

Conversation

@jlinder
Copy link
Copy Markdown
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
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Collaborator Author

jlinder commented Oct 13, 2020

TFTR!

bors r=bdarnell

@DuskEagle
Copy link
Copy Markdown
Member

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

@craig
Copy link
Copy Markdown
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