Skip to content

Commit

Permalink
ubiminimal
Browse files Browse the repository at this point in the history
  • Loading branch information
grooverdan committed May 20, 2024
1 parent b76a621 commit 48ba15e
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 27 deletions.
16 changes: 8 additions & 8 deletions 10.11-ubi/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
FROM redhat/ubi9
FROM redhat/ubi9-minimal

# systemd-coredump has the uid 999, input has group 999, that we want to use for compatibility with the ubuntu image.
RUN groupdel input && \
userdel systemd-coredump && \
groupadd --gid 999 -r mysql && \
# user 999/ group 999, that we want to use for compatibility with the ubuntu image.
RUN groupadd --gid 999 -r mysql && \
useradd -r -g mysql mysql --home-dir /var/lib/mysql --uid 999

ARG TARGETARCH
Expand All @@ -27,13 +25,15 @@ COPY MariaDB.repo /etc/yum.repos.d/
# libboost_program_options.so.1.66.0 only used by garb - should fix upstream
RUN gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys FF8AD1344597106ECE813B918A3872BF3228467C && \
rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm && \
dnf update -y && \
dnf install -y procps-ng zstd xz jemalloc pwgen tzdata && \
rpmkeys --import https://supplychain.mariadb.com/MariaDB-Server-GPG-KEY && \
microdnf update -y && \
microdnf install -y procps-ng zstd xz jemalloc pwgen tzdata && \
for pkg in boost-program-options-1.75.0-8; do \
rpm -ivh https://repo.almalinux.org/almalinux/9/AppStream/$(arch)/os/Packages/${pkg}.el9.$(arch).rpm ; \
done ; \
dnf install -y MariaDB-backup-10.11.8 MariaDB-server-10.11.8 && \
microdnf install -y MariaDB-backup-10.11.8 MariaDB-server-10.11.8 && \
ln -s /usr/lib64/galera-4/libgalera_smm.so /usr/lib/libgalera_smm.so && \
microdnf clean all
rm -rf /var/lib/mysql; \
mkdir -p /var/lib/mysql /var/run/mysqld /etc/mysql/conf.d/ /etc/mysql/mariadb.conf.d/; \
chown -R mysql:mysql /var/lib/mysql /var/run/mysqld; \
Expand Down
3 changes: 2 additions & 1 deletion 10.11-ubi/MariaDB.repo
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
name = MariaDB
#baseurl = https://rpm.mariadb.org/10.11/rhel/$releasever/$basearch
baseurl = https://archive.mariadb.org/mariadb-10.11/yum/rhel/$releasever/$basearch
gpgkey=https://archive.mariadb.org/PublicKey
#microdnf cannot read to the second key here.
#gpgkey=https://archive.mariadb.org/PublicKey
gpgcheck=1
16 changes: 8 additions & 8 deletions 10.6-ubi/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
FROM redhat/ubi9
FROM redhat/ubi9-minimal

# systemd-coredump has the uid 999, input has group 999, that we want to use for compatibility with the ubuntu image.
RUN groupdel input && \
userdel systemd-coredump && \
groupadd --gid 999 -r mysql && \
# user 999/ group 999, that we want to use for compatibility with the ubuntu image.
RUN groupadd --gid 999 -r mysql && \
useradd -r -g mysql mysql --home-dir /var/lib/mysql --uid 999

ARG TARGETARCH
Expand All @@ -27,13 +25,15 @@ COPY MariaDB.repo /etc/yum.repos.d/
# libboost_program_options.so.1.66.0 only used by garb - should fix upstream
RUN gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys FF8AD1344597106ECE813B918A3872BF3228467C && \
rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm && \
dnf update -y && \
dnf install -y procps-ng zstd xz jemalloc pwgen tzdata && \
rpmkeys --import https://supplychain.mariadb.com/MariaDB-Server-GPG-KEY && \
microdnf update -y && \
microdnf install -y procps-ng zstd xz jemalloc pwgen tzdata && \
for pkg in boost-program-options-1.75.0-8; do \
rpm -ivh https://repo.almalinux.org/almalinux/9/AppStream/$(arch)/os/Packages/${pkg}.el9.$(arch).rpm ; \
done ; \
dnf install -y MariaDB-backup-10.6.18 MariaDB-server-10.6.18 && \
microdnf install -y MariaDB-backup-10.6.18 MariaDB-server-10.6.18 && \
ln -s /usr/lib64/galera-4/libgalera_smm.so /usr/lib/libgalera_smm.so && \
microdnf clean all
rm -rf /var/lib/mysql; \
mkdir -p /var/lib/mysql /var/run/mysqld /etc/mysql/conf.d/ /etc/mysql/mariadb.conf.d/; \
chown -R mysql:mysql /var/lib/mysql /var/run/mysqld; \
Expand Down
3 changes: 2 additions & 1 deletion 10.6-ubi/MariaDB.repo
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
name = MariaDB
#baseurl = https://rpm.mariadb.org/10.6/rhel/$releasever/$basearch
baseurl = https://archive.mariadb.org/mariadb-10.6/yum/rhel/$releasever/$basearch
gpgkey=https://archive.mariadb.org/PublicKey
#microdnf cannot read to the second key here.
#gpgkey=https://archive.mariadb.org/PublicKey
gpgcheck=1
16 changes: 8 additions & 8 deletions Dockerfile-ubi.template
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
FROM redhat/ubi9
FROM redhat/ubi9-minimal

# systemd-coredump has the uid 999, input has group 999, that we want to use for compatibility with the ubuntu image.
RUN groupdel input && \
userdel systemd-coredump && \
groupadd --gid 999 -r mysql && \
# user 999/ group 999, that we want to use for compatibility with the ubuntu image.
RUN groupadd --gid 999 -r mysql && \
useradd -r -g mysql mysql --home-dir /var/lib/mysql --uid 999

ARG TARGETARCH
Expand All @@ -27,13 +25,15 @@ COPY MariaDB.repo /etc/yum.repos.d/
# libboost_program_options.so.1.66.0 only used by garb - should fix upstream
RUN gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys FF8AD1344597106ECE813B918A3872BF3228467C && \
rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm && \
dnf update -y && \
dnf install -y procps-ng zstd xz jemalloc pwgen tzdata && \
rpmkeys --import https://supplychain.mariadb.com/MariaDB-Server-GPG-KEY && \
microdnf update -y && \
microdnf install -y procps-ng zstd xz jemalloc pwgen tzdata && \
for pkg in boost-program-options-1.75.0-8; do \
rpm -ivh https://repo.almalinux.org/almalinux/9/AppStream/$(arch)/os/Packages/${pkg}.el9.$(arch).rpm ; \
done ; \
dnf install -y MariaDB-backup-%%MARIADB_VERSION_BASIC%% MariaDB-server-%%MARIADB_VERSION_BASIC%% && \
microdnf install -y MariaDB-backup-%%MARIADB_VERSION_BASIC%% MariaDB-server-%%MARIADB_VERSION_BASIC%% && \
ln -s /usr/lib64/galera-4/libgalera_smm.so /usr/lib/libgalera_smm.so && \
microdnf clean all
rm -rf /var/lib/mysql; \
mkdir -p /var/lib/mysql /var/run/mysqld /etc/mysql/conf.d/ /etc/mysql/mariadb.conf.d/; \
chown -R mysql:mysql /var/lib/mysql /var/run/mysqld; \
Expand Down
3 changes: 2 additions & 1 deletion MariaDB-ubi.repo
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
name = MariaDB
#baseurl = https://rpm.mariadb.org/%%MARIADB_VERSION%%/rhel/$releasever/$basearch
baseurl = https://archive.mariadb.org/mariadb-%%MARIADB_VERSION%%/yum/rhel/$releasever/$basearch
gpgkey=https://archive.mariadb.org/PublicKey
#microdnf cannot read to the second key here.
#gpgkey=https://archive.mariadb.org/PublicKey
gpgcheck=1

0 comments on commit 48ba15e

Please sign in to comment.