Bug 2223028
Summary: | ubi9: Make micro and minimal match by removing tzdata from micro. | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 9 | Reporter: | Carlos O'Donell <codonell> |
Component: | ubi9-micro-container | Assignee: | Jindrich Novy <jnovy> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Edward Shen <weshen> |
Severity: | high | Docs Contact: | Gabriela Nečasová <gnecasov> |
Priority: | unspecified | ||
Version: | 9.3 | CC: | ajia, dornelas, gfialova, gnecasov, jwboyer |
Target Milestone: | rc | Keywords: | Triaged |
Target Release: | --- | Flags: | pm-rhel:
mirror+
|
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Enhancement | |
Doc Text: |
.UBI 9 Micro Container Image no longer contains `zoneinfo` installed by `tzdata`
With this update, the time zone information provided by the `tzdata` package is no longer included in UBI 9 Micro container images, consequently reducing the image size. The UBI 9 Minimal and UBI 9 Micro containers are UTC-only, and users should reinstall the `tzdata` package to get the full `zoneinfo`, if needed.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2023-12-06 21:21:11 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Carlos O'Donell
2023-07-14 21:18:57 UTC
In order to re-install tzdata in the ubi9-micro image you need to do something like: [root@rhel9]# cat build/build.sh #!/bin/bash -x CTR=$(buildah from registry.access.redhat.com/ubi9-micro) CTR_MNT=$(buildah mount $CTR) yum reinstall -y --installroot=$CTR_MNT tzdata buildah commit $CTR localhost/ubi9-micro-tzdata buildah umount $CTR buildah rm $CTR [root@rhel9]# build/build.sh ++ buildah from registry.access.redhat.com/ubi9-micro + CTR=ubi9-micro-working-container ++ buildah mount ubi9-micro-working-container + CTR_MNT=/var/lib/containers/storage/overlay/dd929d29b1d8edf26f59349e80fc42367212d42e8989ac6cf6eb6844001a8031/merged + yum reinstall -y --installroot=/var/lib/containers/storage/overlay/dd929d29b1d8edf26f59349e80fc42367212d42e8989ac6cf6eb6844001a8031/merged tzdata Updating Subscription Management repositories. Unable to read consumer identity This system is not registered with an entitlement server. You can use subscription-manager to register. Red Hat Universal Base Image 9 (RPMs) - BaseOS 1.8 MB/s | 580 kB 00:00 Red Hat Universal Base Image 9 (RPMs) - AppStream 3.2 MB/s | 1.9 MB 00:00 Red Hat Universal Base Image 9 (RPMs) - CodeReady Builder 600 kB/s | 195 kB 00:00 Dependencies resolved. ================================================================================================================================================================ Package Architecture Version Repository Size ================================================================================================================================================================ Reinstalling: tzdata noarch 2023c-1.el9 ubi-9-baseos-rpms 845 k Transaction Summary ================================================================================================================================================================ Total download size: 845 k Installed size: 1.6 M Downloading Packages: tzdata-2023c-1.el9.noarch.rpm 3.6 MB/s | 845 kB 00:00 ---------------------------------------------------------------------------------------------------------------------------------------------------------------- Total 3.6 MB/s | 845 kB 00:00 Red Hat Universal Base Image 9 (RPMs) - BaseOS 3.5 MB/s | 3.6 kB 00:00 Importing GPG key 0xFD431D51: Userid : "Red Hat, Inc. (release key 2) <security>" Fingerprint: 567E 347A D004 4ADE 55BA 8A5F 199E 2F91 FD43 1D51 From : /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release Key imported successfully Importing GPG key 0x5A6340B3: Userid : "Red Hat, Inc. (auxiliary key 3) <security>" Fingerprint: 7E46 2425 8C40 6535 D56D 6F13 5054 E4A4 5A63 40B3 From : /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release Key imported successfully Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Reinstalling : tzdata-2023c-1.el9.noarch 1/2 Cleanup : tzdata-2023c-1.el9.noarch 2/2 Verifying : tzdata-2023c-1.el9.noarch 1/2 Verifying : tzdata-2023c-1.el9.noarch 2/2 Installed products updated. Reinstalled: tzdata-2023c-1.el9.noarch Complete! + buildah commit ubi9-micro-working-container localhost/ubi9-micro-tzdata Getting image source signatures Copying blob e54dc53d0edb skipped: already exists Copying blob 639385989a67 done Copying config 5c4759ed7f done Writing manifest to image destination Storing signatures 5c4759ed7f9760d1e54796b8277f80bd462caa085de91c527f89459312e2af5f + buildah umount ubi9-micro-working-container 8b525ebf7d4e3f6cce296e1de56c79a3c8517bd41f5e674a041a65416f2266df + buildah rm ubi9-micro-working-container 8b525ebf7d4e3f6cce296e1de56c79a3c8517bd41f5e674a041a65416f2266df Wrapping this into a multi-stage Containerfile build (to build as part of a pipeline, etc.) is a bit more complex. (In reply to Derrick Ornelas from comment #1) > Wrapping this into a multi-stage Containerfile build (to build as part of a > pipeline, etc.) is a bit more complex. Derrick, Is this a suggestion to go with a particular solution or just documentation of the steps required to re-install tzdata? It's mostly to document the steps required. It's based on the steps we've published at https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/building_running_and_managing_containers/assembly_adding-software-to-a-ubi-container_building-running-and-managing-containers#proc_using-the-ubi-micro-images_assembly_adding-software-to-a-ubi-container My guess is that most users would want to do this as part of a Containerfile build, but I personally won't have the time to write and test that solution. commit 71ad5cc9df6c4daf802f724131cffc52679667cb (HEAD -> rhel-9.3.0) Author: Josh Boyer <jwboyer> Date: Thu Jul 20 08:56:45 2023 -0400 Remove tzdata to match ubi-minimal (RhBug 2223028) It is unexpected that ubi-micro contains tzdata but ubi-minimal does not. Remove this as well to ensure we remain consistent. Also bump to 9.3 Resolves: #2223028 Signed-off-by: Josh Boyer <jwboyer> diff --git a/Dockerfile b/Dockerfile index 2648391..8e183c5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,14 @@ FROM registry-proxy.engineering.redhat.com/rh-osbs/ubi9 AS ubi-micro-build RUN mkdir -p /mnt/rootfs RUN yum install --installroot /mnt/rootfs coreutils-single glibc-minimal-langpack --releasever 9 --setopt install_weak_deps=false --nodocs -y && yum --installroot /mnt/rootfs clean all -RUN rm -rf /mnt/rootfs/var/cache/* /mnt/rootfs/var/log/dnf* /mnt/rootfs/var/log/yum.* +RUN rm -rf /mnt/rootfs/var/cache/* /mnt/rootfs/var/log/dnf* /mnt/rootfs/var/log/yum.* /mnt/rootfs/usr/share/zoneinfo FROM scratch LABEL maintainer="Red Hat, Inc." LABEL com.redhat.component="ubi9-micro-container" LABEL name="ubi9/ubi-micro" -LABEL version="9.2" +LABEL version="9.3" #label for EULA LABEL com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI" [jwboyer@vader ubi9-micro]$ [jwboyer@vader ubi9-micro]$ podman build -t ubi-micro-test -f Dockerfile [1/2] STEP 1/4: FROM registry-proxy.engineering.redhat.com/rh-osbs/ubi9 AS ubi-micro-build Trying to pull registry-proxy.engineering.redhat.com/rh-osbs/ubi9:latest... Getting image source signatures Copying blob 38719a685243 done Copying config ae57b0b18b done Writing manifest to image destination Storing signatures [1/2] STEP 2/4: RUN mkdir -p /mnt/rootfs --> 325597d9c61 [1/2] STEP 3/4: RUN yum install --installroot /mnt/rootfs coreutils-single glibc-minimal-langpack --releasever 9 --setopt install_weak_deps=false --nodocs -y && yum --installroot /mnt/rootfs clean all Updating Subscription Management repositories. Unable to read consumer identity Subscription Manager is operating in container mode. This system is not registered with an entitlement server. You can use subscription-manager to register. Red Hat Universal Base Image 9 (RPMs) - BaseOS 783 kB/s | 580 kB 00:00 Red Hat Universal Base Image 9 (RPMs) - AppStre 2.5 MB/s | 1.9 MB 00:00 Red Hat Universal Base Image 9 (RPMs) - CodeRea 278 kB/s | 195 kB 00:00 Dependencies resolved. ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: coreutils-single x86_64 8.32-34.el9 ubi-9-baseos-rpms 626 k glibc-minimal-langpack x86_64 2.34-60.el9 ubi-9-baseos-rpms 36 k Installing dependencies: basesystem noarch 11-13.el9 ubi-9-baseos-rpms 8.0 k bash x86_64 5.1.8-6.el9_1 ubi-9-baseos-rpms 1.7 M filesystem x86_64 3.16-2.el9 ubi-9-baseos-rpms 4.7 M glibc x86_64 2.34-60.el9 ubi-9-baseos-rpms 1.9 M glibc-common x86_64 2.34-60.el9 ubi-9-baseos-rpms 320 k libacl x86_64 2.3.1-3.el9 ubi-9-baseos-rpms 26 k libattr x86_64 2.5.1-3.el9 ubi-9-baseos-rpms 20 k libcap x86_64 2.48-8.el9 ubi-9-baseos-rpms 76 k libgcc x86_64 11.3.1-4.3.el9 ubi-9-baseos-rpms 114 k libselinux x86_64 3.5-1.el9 ubi-9-baseos-rpms 88 k libsepol x86_64 3.5-1.el9 ubi-9-baseos-rpms 317 k ncurses-base noarch 6.2-8.20210508.el9 ubi-9-baseos-rpms 100 k ncurses-libs x86_64 6.2-8.20210508.el9 ubi-9-baseos-rpms 334 k pcre2 x86_64 10.40-2.el9 ubi-9-baseos-rpms 239 k pcre2-syntax noarch 10.40-2.el9 ubi-9-baseos-rpms 147 k redhat-release x86_64 9.2-0.13.el9 ubi-9-baseos-rpms 46 k setup noarch 2.13.7-9.el9 ubi-9-baseos-rpms 150 k tzdata noarch 2023c-1.el9 ubi-9-baseos-rpms 845 k Transaction Summary ================================================================================ Install 20 Packages Total download size: 12 M Installed size: 21 M Downloading Packages: (1/20): libcap-2.48-8.el9.x86_64.rpm 191 kB/s | 76 kB 00:00 (2/20): pcre2-10.40-2.el9.x86_64.rpm 527 kB/s | 239 kB 00:00 (3/20): setup-2.13.7-9.el9.noarch.rpm 1.5 MB/s | 150 kB 00:00 (4/20): redhat-release-9.2-0.13.el9.x86_64.rpm 826 kB/s | 46 kB 00:00 (5/20): libacl-2.3.1-3.el9.x86_64.rpm 465 kB/s | 26 kB 00:00 (6/20): glibc-2.34-60.el9.x86_64.rpm 3.4 MB/s | 1.9 MB 00:00 (7/20): libgcc-11.3.1-4.3.el9.x86_64.rpm 2.0 MB/s | 114 kB 00:00 (8/20): glibc-common-2.34-60.el9.x86_64.rpm 5.2 MB/s | 320 kB 00:00 (9/20): ncurses-libs-6.2-8.20210508.el9.x86_64. 4.5 MB/s | 334 kB 00:00 (10/20): filesystem-3.16-2.el9.x86_64.rpm 20 MB/s | 4.7 MB 00:00 (11/20): basesystem-11-13.el9.noarch.rpm 127 kB/s | 8.0 kB 00:00 (12/20): bash-5.1.8-6.el9_1.x86_64.rpm 8.7 MB/s | 1.7 MB 00:00 (13/20): pcre2-syntax-10.40-2.el9.noarch.rpm 2.5 MB/s | 147 kB 00:00 (14/20): tzdata-2023c-1.el9.noarch.rpm 13 MB/s | 845 kB 00:00 (15/20): ncurses-base-6.2-8.20210508.el9.noarch 1.8 MB/s | 100 kB 00:00 (16/20): libsepol-3.5-1.el9.x86_64.rpm 3.6 MB/s | 317 kB 00:00 (17/20): glibc-minimal-langpack-2.34-60.el9.x86 602 kB/s | 36 kB 00:00 (18/20): libselinux-3.5-1.el9.x86_64.rpm 1.7 MB/s | 88 kB 00:00 (19/20): coreutils-single-8.32-34.el9.x86_64.rp 9.2 MB/s | 626 kB 00:00 (20/20): libattr-2.5.1-3.el9.x86_64.rpm 160 kB/s | 20 kB 00:00 -------------------------------------------------------------------------------- Total 11 MB/s | 12 MB 00:01 Red Hat Universal Base Image 9 (RPMs) - BaseOS 3.5 MB/s | 3.6 kB 00:00 Importing GPG key 0xFD431D51: Userid : "Red Hat, Inc. (release key 2) <security>" Fingerprint: 567E 347A D004 4ADE 55BA 8A5F 199E 2F91 FD43 1D51 From : /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release Key imported successfully Importing GPG key 0x5A6340B3: Userid : "Red Hat, Inc. (auxiliary key 3) <security>" Fingerprint: 7E46 2425 8C40 6535 D56D 6F13 5054 E4A4 5A63 40B3 From : /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release Key imported successfully Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Running scriptlet: filesystem-3.16-2.el9.x86_64 1/1 Preparing : 1/1 Installing : libgcc-11.3.1-4.3.el9.x86_64 1/20 Running scriptlet: libgcc-11.3.1-4.3.el9.x86_64 1/20 Installing : ncurses-base-6.2-8.20210508.el9.noarch 2/20 Installing : tzdata-2023c-1.el9.noarch 3/20 Installing : pcre2-syntax-10.40-2.el9.noarch 4/20 Installing : redhat-release-9.2-0.13.el9.x86_64 5/20 Installing : setup-2.13.7-9.el9.noarch 6/20 Running scriptlet: setup-2.13.7-9.el9.noarch 6/20 Installing : filesystem-3.16-2.el9.x86_64 7/20 Installing : basesystem-11-13.el9.noarch 8/20 Installing : glibc-common-2.34-60.el9.x86_64 9/20 Installing : bash-5.1.8-6.el9_1.x86_64 10/20 Running scriptlet: bash-5.1.8-6.el9_1.x86_64 10/20 Installing : ncurses-libs-6.2-8.20210508.el9.x86_64 11/20 Installing : glibc-minimal-langpack-2.34-60.el9.x86_64 12/20 Running scriptlet: glibc-2.34-60.el9.x86_64 13/20 Installing : glibc-2.34-60.el9.x86_64 13/20 Running scriptlet: glibc-2.34-60.el9.x86_64 13/20 Installing : libattr-2.5.1-3.el9.x86_64 14/20 Installing : libacl-2.3.1-3.el9.x86_64 15/20 Installing : pcre2-10.40-2.el9.x86_64 16/20 Installing : libcap-2.48-8.el9.x86_64 17/20 Installing : libsepol-3.5-1.el9.x86_64 18/20 Installing : libselinux-3.5-1.el9.x86_64 19/20 Installing : coreutils-single-8.32-34.el9.x86_64 20/20 Running scriptlet: filesystem-3.16-2.el9.x86_64 20/20 Running scriptlet: coreutils-single-8.32-34.el9.x86_64 20/20 Verifying : glibc-2.34-60.el9.x86_64 1/20 Verifying : pcre2-10.40-2.el9.x86_64 2/20 Verifying : libcap-2.48-8.el9.x86_64 3/20 Verifying : setup-2.13.7-9.el9.noarch 4/20 Verifying : redhat-release-9.2-0.13.el9.x86_64 5/20 Verifying : libacl-2.3.1-3.el9.x86_64 6/20 Verifying : filesystem-3.16-2.el9.x86_64 7/20 Verifying : libgcc-11.3.1-4.3.el9.x86_64 8/20 Verifying : glibc-common-2.34-60.el9.x86_64 9/20 Verifying : bash-5.1.8-6.el9_1.x86_64 10/20 Verifying : ncurses-libs-6.2-8.20210508.el9.x86_64 11/20 Verifying : basesystem-11-13.el9.noarch 12/20 Verifying : pcre2-syntax-10.40-2.el9.noarch 13/20 Verifying : tzdata-2023c-1.el9.noarch 14/20 Verifying : ncurses-base-6.2-8.20210508.el9.noarch 15/20 Verifying : libsepol-3.5-1.el9.x86_64 16/20 Verifying : glibc-minimal-langpack-2.34-60.el9.x86_64 17/20 Verifying : libselinux-3.5-1.el9.x86_64 18/20 Verifying : coreutils-single-8.32-34.el9.x86_64 19/20 Verifying : libattr-2.5.1-3.el9.x86_64 20/20 Installed products updated. Installed: basesystem-11-13.el9.noarch bash-5.1.8-6.el9_1.x86_64 coreutils-single-8.32-34.el9.x86_64 filesystem-3.16-2.el9.x86_64 glibc-2.34-60.el9.x86_64 glibc-common-2.34-60.el9.x86_64 glibc-minimal-langpack-2.34-60.el9.x86_64 libacl-2.3.1-3.el9.x86_64 libattr-2.5.1-3.el9.x86_64 libcap-2.48-8.el9.x86_64 libgcc-11.3.1-4.3.el9.x86_64 libselinux-3.5-1.el9.x86_64 libsepol-3.5-1.el9.x86_64 ncurses-base-6.2-8.20210508.el9.noarch ncurses-libs-6.2-8.20210508.el9.x86_64 pcre2-10.40-2.el9.x86_64 pcre2-syntax-10.40-2.el9.noarch redhat-release-9.2-0.13.el9.x86_64 setup-2.13.7-9.el9.noarch tzdata-2023c-1.el9.noarch Complete! Updating Subscription Management repositories. Unable to read consumer identity Subscription Manager is operating in container mode. This system is not registered with an entitlement server. You can use subscription-manager to register. 26 files removed --> 010b0bd400d [1/2] STEP 4/4: RUN rm -rf /mnt/rootfs/var/cache/* /mnt/rootfs/var/log/dnf* /mnt/rootfs/var/log/yum.* /mnt/rootfs/usr/share/zoneinfo --> 5b9e132d90a [2/2] STEP 1/13: FROM scratch [2/2] STEP 2/13: LABEL maintainer="Red Hat, Inc." --> c8c51ac4b5c [2/2] STEP 3/13: LABEL com.redhat.component="ubi9-micro-container" --> f51c709b181 [2/2] STEP 4/13: LABEL name="ubi9/ubi-micro" --> d2dd1ecb2cc [2/2] STEP 5/13: LABEL version="9.3" --> 8aa14dd7b1f [2/2] STEP 6/13: LABEL com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI" --> 0309dcb0ef9 [2/2] STEP 7/13: LABEL summary="ubi9 micro image" --> 50f7b4d4616 [2/2] STEP 8/13: LABEL description="Very small image which doesn't install the package manager." --> 8ae181c1df7 [2/2] STEP 9/13: LABEL io.k8s.display-name="Ubi9-micro" --> e8f7fbe4e88 [2/2] STEP 10/13: LABEL io.openshift.expose-services="" --> 8edb90e4274 [2/2] STEP 11/13: COPY --from=ubi-micro-build /mnt/rootfs/ / --> b04a5c5b805 [2/2] STEP 12/13: COPY --from=ubi-micro-build /etc/yum.repos.d/ubi.repo /etc/yum.repos.d/ubi.repo --> aab21dfcdcc [2/2] STEP 13/13: CMD /bin/sh [2/2] COMMIT ubi-micro-test --> e14d568176e Successfully tagged localhost/ubi-micro-test:latest e14d568176e4ec7e86ce29e11833efe2a9003d6b5a60fde08be973fe70ae8cdb [jwboyer@vader ubi9-micro]$ podman run -it --rm ubi-micro-test sh-5.1# ls /usr/share/zoneinfo ls: cannot access '/usr/share/zoneinfo': No such file or directory sh-5.1# exit exit [jwboyer@vader ubi9-micro]$ [jwboyer@vader penumbra-baseline-data]$ podman run -it --rm registry-proxy.engineering.redhat.com/rh-osbs/ubi9-ubi-micro:9.3-1 Trying to pull registry-proxy.engineering.redhat.com/rh-osbs/ubi9-ubi-micro:9.3-1... Getting image source signatures Copying blob 1d3dfed1c91c done Copying config a784243497 done Writing manifest to image destination Storing signatures sh-5.1# ls /usr/share/zoneinfo ls: cannot access '/usr/share/zoneinfo': No such file or directory sh-5.1# exit exit [jwboyer@vader penumbra-baseline-data]$ This change is available starting with the ubi9-micro:9.3 image. https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/9.3_release_notes/new-features#new-features-containers |