Skip to content

Commit

Permalink
[PKG-291]: Using UBI 9 base images for PS 5.7 and 8.0. (#1094)
Browse files Browse the repository at this point in the history
  • Loading branch information
maqeel75 authored Dec 19, 2024
1 parent aa40774 commit 01bae5a
Show file tree
Hide file tree
Showing 6 changed files with 108 additions and 71 deletions.
16 changes: 9 additions & 7 deletions percona-server-5.7/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM redhat/ubi8-minimal
FROM redhat/ubi9-minimal

LABEL org.opencontainers.image.authors="[email protected]"

Expand All @@ -20,21 +20,23 @@ RUN set -ex; \
gpg --batch --export --armor 4D1BB29D63D98E422B2113B19334A25F8507EFA5 > ${GNUPGHOME}/PERCONA-PACKAGING-KEY; \
gpg --batch --export --armor 99DB70FAE1D7CE227FB6488205B555B38483C65D > ${GNUPGHOME}/RPM-GPG-KEY-centosofficial; \
rpmkeys --import ${GNUPGHOME}/PERCONA-PACKAGING-KEY ${GNUPGHOME}/RPM-GPG-KEY-centosofficial; \
microdnf install -y findutils; \
microdnf install -y findutils numactl-libs; \
curl -Lf -o /tmp/percona-release.rpm https://repo.percona.com/yum/percona-release-latest.noarch.rpm; \
rpmkeys --checksig /tmp/percona-release.rpm; \
rpm -i /tmp/percona-release.rpm; \
percona-release enable-only ps-57 testing; \
rm -rf "$GNUPGHOME" /tmp/percona-release.rpm; \
rpm --import /etc/pki/rpm-gpg/PERCONA-PACKAGING-KEY; \
#microdnf -y module disable mysql; \
curl -Lf -o /tmp/numactl-libs.rpm http://vault.centos.org/centos/8/BaseOS/x86_64/os/Packages/numactl-libs-2.0.12-13.el8.x86_64.rpm; \
rpmkeys --checksig /tmp/numactl-libs.rpm; \
rpm -i /tmp/numactl-libs.rpm; \
rm -rf /tmp/numactl-libs.rpm
curl -O https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-9; \
rpm --import RPM-GPG-KEY-EPEL-9; \
curl -Lf -o /tmp/jemalloc.rpm https://rpmfind.net/linux/epel/9/Everything/x86_64/Packages/j/jemalloc-5.2.1-2.el9.x86_64.rpm; \
rpmkeys --checksig /tmp/jemalloc.rpm; \
rpm -i /tmp/jemalloc.rpm; \
rm -f /tmp/jemalloc.rpm

ENV PS_VERSION 5.7.44-48.1
ENV OS_VER el8
ENV OS_VER el9
ENV FULL_PERCONA_VERSION "$PS_VERSION.$OS_VER"
ENV PS_TELEMETRY_VERSION 5.7.44-48-1
ENV CALL_HOME_DOWNLOAD_SHA256 5e84d2f1a5d57f44c46e6a1f16794d649d3de09fe8021f0294bc321c89e51068
Expand Down
27 changes: 18 additions & 9 deletions percona-server-5.7/Dockerfile-dockerhub
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
# https://github.com/docker-library/official-images:
# No official images can be derived from, or depend on, non-official images
# with the following notable exceptions...
FROM oraclelinux:8
FROM redhat/ubi9-minimal

LABEL org.opencontainers.image.authors="[email protected]"

# It is intentionally used another UID, to have backward compatibility with
# the previous image versions published on Docker Hub
RUN set -ex; \
groupdel ssh_keys; \
userdel systemd-coredump; \
#groupdel ssh_keys; \
#userdel systemd-coredump; \
groupadd -g 999 mysql; \
useradd -u 999 -r -g 999 -s /sbin/nologin \
-c "Default Application User" mysql
Expand All @@ -25,13 +25,21 @@ RUN set -ex; \
rpmkeys --import ${GNUPGHOME}/PERCONA-PACKAGING-KEY ${GNUPGHOME}/RPM-GPG-KEY-centosofficial; \
curl -Lf -o /tmp/percona-release.rpm https://repo.percona.com/yum/percona-release-latest.noarch.rpm; \
rpmkeys --checksig /tmp/percona-release.rpm; \
microdnf install -y findutils; \
rpm -i /tmp/percona-release.rpm; \
percona-release enable-only ps-57 testing; \
rm -rf "$GNUPGHOME" /tmp/percona-release.rpm; \
rpm --import /etc/pki/rpm-gpg/PERCONA-PACKAGING-KEY; \
dnf -y module disable mysql
#microdnf -y module disable mysql; \
curl -O https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-9; \
rpm --import RPM-GPG-KEY-EPEL-9; \
curl -Lf -o /tmp/jemalloc.rpm https://rpmfind.net/linux/epel/9/Everything/x86_64/Packages/j/jemalloc-5.2.1-2.el9.x86_64.rpm; \
rpmkeys --checksig /tmp/jemalloc.rpm; \
rpm -i /tmp/jemalloc.rpm; \
rm -f /tmp/jemalloc.rpm

ENV PS_VERSION 5.7.44-48.1
ENV OS_VER el8
ENV OS_VER el9
ENV FULL_PERCONA_VERSION "$PS_VERSION.$OS_VER"
ENV PS_TELEMETRY_VERSION 5.7.44-48-1
ENV CALL_HOME_DOWNLOAD_SHA256 5e84d2f1a5d57f44c46e6a1f16794d649d3de09fe8021f0294bc321c89e51068
Expand All @@ -46,20 +54,21 @@ ARG PERCONA_TELEMETRY_DISABLE=1

RUN set -ex; \
rpm -e --nodeps tzdata; \
dnf config-manager --enable ol8_u4_security_validation; \
dnf -y install \
#microdnf config-manager --enable ol8_u4_security_validation; \
microdnf -y install \
tzdata \
jemalloc \
which \
tar \
cracklib-dicts \
policycoreutils; \
\
dnf -y install \
microdnf -y install \
Percona-Server-server-57-${FULL_PERCONA_VERSION} \
Percona-Server-devel-57-${FULL_PERCONA_VERSION} \
Percona-Server-tokudb-57-${FULL_PERCONA_VERSION} \
Percona-Server-rocksdb-57-${FULL_PERCONA_VERSION}; \
dnf clean all; \
microdnf clean all; \
rm -rf /var/cache/dnf /var/cache/yum /var/lib/mysql

# purge and re-create /var/lib/mysql with appropriate ownership
Expand Down
44 changes: 23 additions & 21 deletions percona-server-5.7/Dockerfile-pro
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM redhat/ubi8-minimal
FROM redhat/ubi9-minimal

LABEL org.opencontainers.image.authors="[email protected]"

Expand All @@ -20,21 +20,23 @@ RUN set -ex; \
gpg --batch --export --armor 4D1BB29D63D98E422B2113B19334A25F8507EFA5 > ${GNUPGHOME}/PERCONA-PACKAGING-KEY; \
gpg --batch --export --armor 99DB70FAE1D7CE227FB6488205B555B38483C65D > ${GNUPGHOME}/RPM-GPG-KEY-centosofficial; \
rpmkeys --import ${GNUPGHOME}/PERCONA-PACKAGING-KEY ${GNUPGHOME}/RPM-GPG-KEY-centosofficial; \
microdnf install -y findutils; \
microdnf install -y findutils numactl-libs; \
curl -Lf -o /tmp/percona-release.rpm https://repo.percona.com/yum/percona-release-latest.noarch.rpm; \
rpmkeys --checksig /tmp/percona-release.rpm; \
rpm -i /tmp/percona-release.rpm; \
percona-release enable-only ps-57 testing; \
rm -rf "$GNUPGHOME" /tmp/percona-release.rpm; \
rpm --import /etc/pki/rpm-gpg/PERCONA-PACKAGING-KEY; \
#microdnf -y module disable mysql; \
curl -Lf -o /tmp/numactl-libs.rpm http://vault.centos.org/centos/8/BaseOS/x86_64/os/Packages/numactl-libs-2.0.12-13.el8.x86_64.rpm; \
rpmkeys --checksig /tmp/numactl-libs.rpm; \
rpm -i /tmp/numactl-libs.rpm; \
rm -rf /tmp/numactl-libs.rpm
curl -O https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-9; \
rpm --import RPM-GPG-KEY-EPEL-9; \
curl -Lf -o /tmp/jemalloc.rpm https://rpmfind.net/linux/epel/9/Everything/x86_64/Packages/j/jemalloc-5.2.1-2.el9.x86_64.rpm; \
rpmkeys --checksig /tmp/jemalloc.rpm; \
rpm -i /tmp/jemalloc.rpm; \
rm -f /tmp/jemalloc.rpm

ENV PS_VERSION 5.7.44-52.1
ENV OS_VER el8
ENV OS_VER el9
ENV FULL_PERCONA_VERSION "$PS_VERSION.$OS_VER"
ENV PS_TELEMETRY_VERSION 5.7.44-52-1
ENV CALL_HOME_DOWNLOAD_SHA256 5e84d2f1a5d57f44c46e6a1f16794d649d3de09fe8021f0294bc321c89e51068
Expand All @@ -47,13 +49,13 @@ ENV CALL_HOME_VERSION 0.1
# remove telemetry config file after installing packages!
ARG PERCONA_TELEMETRY_DISABLE=1

COPY Percona-Server-server-57-${PS_VERSION}.el8.x86_64.rpm /tmp
COPY Percona-Server-client-57-${PS_VERSION}.el8.x86_64.rpm /tmp
COPY Percona-Server-shared-57-${PS_VERSION}.el8.x86_64.rpm /tmp
COPY Percona-Server-shared-compat-57-${PS_VERSION}.el8.x86_64.rpm /tmp
COPY Percona-Server-devel-57-${PS_VERSION}.el8.x86_64.rpm /tmp
COPY Percona-Server-rocksdb-57-${PS_VERSION}.el8.x86_64.rpm /tmp
COPY Percona-Server-tokudb-57-${PS_VERSION}.el8.x86_64.rpm /tmp
COPY Percona-Server-server-57-${PS_VERSION}.el9.x86_64.rpm /tmp
COPY Percona-Server-client-57-${PS_VERSION}.el9.x86_64.rpm /tmp
COPY Percona-Server-shared-57-${PS_VERSION}.el9.x86_64.rpm /tmp
COPY Percona-Server-shared-compat-57-${PS_VERSION}.el9.x86_64.rpm /tmp
COPY Percona-Server-devel-57-${PS_VERSION}.el9.x86_64.rpm /tmp
COPY Percona-Server-rocksdb-57-${PS_VERSION}.el9.x86_64.rpm /tmp
COPY Percona-Server-tokudb-57-${PS_VERSION}.el9.x86_64.rpm /tmp

RUN set -ex; \
rpm -e --nodeps tzdata; \
Expand Down Expand Up @@ -82,13 +84,13 @@ RUN set -ex; \
#rpm -iv /tmp/selinux-policy.rpm --nodeps; \
#rm -rf /tmp/selinux-policy.rpm; \
\
rpm -iv /tmp/Percona-Server-shared-compat-57-${PS_VERSION}.el8.x86_64.rpm; \
rpm -iv /tmp/Percona-Server-shared-57-${PS_VERSION}.el8.x86_64.rpm; \
rpm -iv /tmp/Percona-Server-client-57-${PS_VERSION}.el8.x86_64.rpm; \
rpm -iv /tmp/Percona-Server-server-57-${PS_VERSION}.el8.x86_64.rpm; \
rpm -iv /tmp/Percona-Server-devel-57-${PS_VERSION}.el8.x86_64.rpm; \
rpm -iv /tmp/Percona-Server-rocksdb-57-${PS_VERSION}.el8.x86_64.rpm; \
rpm -iv /tmp/Percona-Server-tokudb-57-${PS_VERSION}.el8.x86_64.rpm; \
rpm -iv /tmp/Percona-Server-shared-compat-57-${PS_VERSION}.el9.x86_64.rpm; \
rpm -iv /tmp/Percona-Server-shared-57-${PS_VERSION}.el9.x86_64.rpm; \
rpm -iv /tmp/Percona-Server-client-57-${PS_VERSION}.el9.x86_64.rpm; \
rpm -iv /tmp/Percona-Server-server-57-${PS_VERSION}.el9.x86_64.rpm; \
rpm -iv /tmp/Percona-Server-devel-57-${PS_VERSION}.el9.x86_64.rpm; \
rpm -iv /tmp/Percona-Server-rocksdb-57-${PS_VERSION}.el9.x86_64.rpm; \
rpm -iv /tmp/Percona-Server-tokudb-57-${PS_VERSION}.el9.x86_64.rpm; \
microdnf clean all; \
rm -rf /var/cache/dnf /var/cache/yum /var/lib/mysql; \
rm -rf /tmp/*.rpm
Expand Down
30 changes: 19 additions & 11 deletions percona-server-8.0/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
# https://github.com/docker-library/official-images:
# No official images can be derived from, or depend on, non-official images
# with the following notable exceptions...
FROM oraclelinux:9
FROM redhat/ubi9-minimal

LABEL org.opencontainers.image.authors="[email protected]"

# It is intentionally used another UID, to have backward compatibility with
# the previous image versions published on Docker Hub
RUN set -ex; \
groupdel input; \
userdel systemd-coredump; \
#groupdel input; \
#userdel systemd-coredump; \
groupadd -g 1001 mysql; \
useradd -u 1001 -r -g 1001 -s /sbin/nologin \
-m -c "Default Application User" mysql
Expand Down Expand Up @@ -41,43 +41,51 @@ RUN set -ex; \
rpmkeys --import ${GNUPGHOME}/PERCONA-PACKAGING-KEY ${GNUPGHOME}/RPM-GPG-KEY-centosofficial; \
curl -Lf -o /tmp/percona-release.rpm https://repo.percona.com/yum/percona-release-latest.noarch.rpm; \
rpmkeys --checksig /tmp/percona-release.rpm; \
microdnf install -y findutils; \
rpm -i /tmp/percona-release.rpm; \
rm -rf "$GNUPGHOME" /tmp/percona-release.rpm; \
rpm --import /etc/pki/rpm-gpg/PERCONA-PACKAGING-KEY; \
percona-release disable all; \
percona-release enable ps-80 ${PS_REPO}; \
percona-release enable telemetry ${PS_REPO}; \
percona-release enable mysql-shell ${PS_REPO}
percona-release enable mysql-shell ${PS_REPO}; \
curl -O https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-9; \
rpm --import RPM-GPG-KEY-EPEL-9; \
curl -Lf -o /tmp/jemalloc.rpm https://rpmfind.net/linux/epel/9/Everything/x86_64/Packages/j/jemalloc-5.2.1-2.el9.x86_64.rpm; \
curl -Lf -o /tmp/gflags.rpm https://rpmfind.net/linux/epel/9/Everything/x86_64/Packages/g/gflags-2.2.2-9.el9.x86_64.rpm; \
rpmkeys --checksig /tmp/gflags.rpm /tmp/jemalloc.rpm; \
rpm -i /tmp/jemalloc.rpm; \
rpm -i /tmp/gflags.rpm; \
rm -f /tmp/gflags.rpm /tmp/jemalloc.rpm

RUN set -ex; \
dnf -y install epel-release; \
#microdnf -y install epel-release; \
rpm -e --nodeps tzdata; \
dnf -y install \
microdnf -y install \
hostname \
tzdata \
jemalloc \
which \
cracklib-dicts \
tar \
policycoreutils; \
dnf -y update \
curl \
glibc \
microdnf -y update \
#glibc \
libnghttp2 \
openssh \
python3-setuptools-wheel \
krb5-libs \
pam \
python3; \
\
dnf -y install \
microdnf -y install \
percona-server-server-${FULL_PERCONA_VERSION} \
#percona-server-tokudb-${FULL_PERCONA_VERSION} \
percona-server-devel-${FULL_PERCONA_VERSION} \
percona-server-rocksdb-${FULL_PERCONA_VERSION} \
percona-icu-data-files-${FULL_PERCONA_VERSION} \
percona-mysql-shell-${FULL_MYSQL_SHELL_VERSION}; \
dnf clean all; \
microdnf clean all; \
rm -rf /var/cache/dnf /var/cache/yum /var/lib/mysql

# purge and re-create /var/lib/mysql with appropriate ownership
Expand Down
30 changes: 19 additions & 11 deletions percona-server-8.0/Dockerfile-dockerhub
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
# https://github.com/docker-library/official-images:
# No official images can be derived from, or depend on, non-official images
# with the following notable exceptions...
FROM oraclelinux:9
FROM redhat/ubi9-minimal

LABEL org.opencontainers.image.authors="[email protected]"

# It is intentionally used another UID, to have backward compatibility with
# the previous image versions published on Docker Hub
RUN set -ex; \
groupdel input; \
userdel systemd-coredump; \
#groupdel input; \
#userdel systemd-coredump; \
groupadd -g 1001 mysql; \
useradd -u 1001 -r -g 1001 -s /sbin/nologin \
-m -c "Default Application User" mysql
Expand Down Expand Up @@ -41,42 +41,50 @@ RUN set -ex; \
rpmkeys --import ${GNUPGHOME}/PERCONA-PACKAGING-KEY ${GNUPGHOME}/RPM-GPG-KEY-centosofficial; \
curl -Lf -o /tmp/percona-release.rpm https://repo.percona.com/yum/percona-release-latest.noarch.rpm; \
rpmkeys --checksig /tmp/percona-release.rpm; \
microdnf install -y findutils; \
rpm -i /tmp/percona-release.rpm; \
rm -rf "$GNUPGHOME" /tmp/percona-release.rpm; \
rpm --import /etc/pki/rpm-gpg/PERCONA-PACKAGING-KEY; \
percona-release disable all; \
percona-release enable ps-80 ${PS_REPO}; \
percona-release enable mysql-shell ${PS_REPO}
percona-release enable mysql-shell ${PS_REPO}; \
curl -O https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-9; \
rpm --import RPM-GPG-KEY-EPEL-9; \
curl -Lf -o /tmp/jemalloc.rpm https://rpmfind.net/linux/epel/9/Everything/x86_64/Packages/j/jemalloc-5.2.1-2.el9.x86_64.rpm; \
curl -Lf -o /tmp/gflags.rpm https://rpmfind.net/linux/epel/9/Everything/x86_64/Packages/g/gflags-2.2.2-9.el9.x86_64.rpm; \
rpmkeys --checksig /tmp/gflags.rpm /tmp/jemalloc.rpm; \
rpm -i /tmp/jemalloc.rpm; \
rpm -i /tmp/gflags.rpm; \
rm -f /tmp/gflags.rpm /tmp/jemalloc.rpm

RUN set -ex; \
dnf -y install epel-release; \
#microdnf -y install epel-release; \
rpm -e --nodeps tzdata; \
dnf -y install \
microdnf -y install \
hostname \
tzdata \
jemalloc \
which \
cracklib-dicts \
tar \
policycoreutils; \
dnf -y update \
curl \
glibc \
microdnf -y update \
#glibc \
libnghttp2 \
openssh \
python3-setuptools-wheel \
krb5-libs \
pam \
python3; \
\
dnf -y install \
microdnf -y install \
percona-server-server-${FULL_PERCONA_VERSION} \
#percona-server-tokudb-${FULL_PERCONA_VERSION} \
percona-server-devel-${FULL_PERCONA_VERSION} \
percona-server-rocksdb-${FULL_PERCONA_VERSION} \
percona-icu-data-files-${FULL_PERCONA_VERSION} \
percona-mysql-shell-${FULL_MYSQL_SHELL_VERSION}; \
dnf clean all; \
microdnf clean all; \
rm -rf /var/cache/dnf /var/cache/yum /var/lib/mysql

# purge and re-create /var/lib/mysql with appropriate ownership
Expand Down
Loading

0 comments on commit 01bae5a

Please sign in to comment.