From 9ffed71b948ef101890ff13dff9a09bd817f96a2377bd61c2b105054474f9c86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= Date: Mon, 25 Nov 2024 11:59:47 +0000 Subject: [PATCH] [info=28b538778d639fbb38afee1d96f3f820] OBS-URL: https://build.opensuse.org/package/show/devel:BCI:Tumbleweed/mariadb-client-image?expand=0&rev=180 --- Dockerfile | 15 ++++++++++----- mariadb-client-image.changes | 5 +++++ 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index e1054f7..28ac554 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,13 +20,20 @@ #!BuildTag: opensuse/mariadb-client:11.6 #!BuildTag: opensuse/mariadb-client:latest -FROM opensuse/tumbleweed:latest +FROM opensuse/bci/bci-micro:latest AS target +FROM opensuse/tumbleweed:latest AS builder +COPY --from=target / /target RUN set -euo pipefail; \ - zypper -n install --no-recommends mariadb-client; \ + zypper -n --installroot /target --gpg-auto-import-keys install --no-recommends mariadb-client; \ zypper -n clean; \ rm -rf {/target,}/var/log/{alternatives.log,lastlog,tallylog,zypper.log,zypp/history,YaST2} - +# sanity check that the version from the tag is equal to the version of mariadb-client that we expect +RUN set -euo pipefail; \ + [ "$(rpm --root /target -q --qf '%{version}' mariadb-client | \ + cut -d '.' -f -2)" = "11.6" ] +FROM opensuse/bci/bci-micro:latest +COPY --from=builder /target / # Define labels according to https://en.opensuse.org/Building_derived_containers # labelprefix=org.opensuse.application.mariadb-client LABEL org.opencontainers.image.title="openSUSE Tumbleweed MariaDB Client" @@ -44,5 +51,3 @@ LABEL org.opensuse.release-stage="released" # endlabelprefix LABEL io.artifacthub.package.readme-url="https://raw.githubusercontent.com/SUSE/BCI-dockerfile-generator/Tumbleweed/mariadb-client-image/README.md" CMD ["mariadb"] -# sanity check that the version from the tag is equal to the version of mariadb-client that we expect -RUN set -euo pipefail; [ "$(rpm -q --qf '%{version}' mariadb-client | cut -d '.' -f -2)" = "11.6" ] diff --git a/mariadb-client-image.changes b/mariadb-client-image.changes index 7390154..9061391 100644 --- a/mariadb-client-image.changes +++ b/mariadb-client-image.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Nov 25 11:56:07 UTC 2024 - SUSE Update Bot + +- Switch to a multistage build and base the final image on micro + ------------------------------------------------------------------- Mon Nov 18 09:27:58 UTC 2024 - SUSE Update Bot