Skip to content

Commit 0ff6324

Browse files
committed
Update repository to rocky linux 9
1 parent 503d5be commit 0ff6324

File tree

5 files changed

+40
-39
lines changed

5 files changed

+40
-39
lines changed

Dockerfile

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1-
FROM centos:centos7
1+
FROM rockylinux:9
22

33
# Install as much as we can of the base packages at first step to speed up the build
44
# Remove language override, may be required for some tests
55
# glibc-common is reinstalled to restore some missing locales
6-
RUN sed -i 's/^\(override_install_langs.*\)$/#\1/' /etc/yum.conf \
6+
RUN sed -i 's/^\(override_install_langs.*\)$/#\1/' /etc/dnf/dnf.conf \
7+
&& echo "fastestmirror=True" >> /etc/dnf/dnf.conf \
8+
&& echo "max_parallel_downloads=20" >> /etc/dnf/dnf.conf \
79
&& ln -svf /usr/share/zoneinfo/UTC /etc/localtime \
8-
&& yum -y upgrade \
9-
&& yum -y install epel-release \
10-
&& yum -y reinstall glibc-common \
11-
&& yum -y install \
12-
yum-utils \
13-
curl \
10+
&& dnf -y upgrade \
11+
&& dnf -y install epel-release \
12+
&& dnf -y reinstall glibc-common \
13+
&& dnf -y install \
14+
dnf-utils \
1415
wget \
1516
unzip \
1617
git \
@@ -39,22 +40,22 @@ RUN sed -i 's/^\(override_install_langs.*\)$/#\1/' /etc/yum.conf \
3940
gcc-c++ \
4041
fontconfig \
4142
libmcrypt \
42-
libzip5 \
43+
libzip \
4344
fribidi \
4445
graphviz \
4546
pngquant \
4647
libjpeg-turbo \
4748
optipng \
4849
gifsicle \
4950
jpegoptim \
50-
&& yum clean all
51+
&& dnf clean all
5152

5253
ARG ELASTICSEARCH_VERSION="7.17.3-x86_64"
5354
ENV ELASTICSEARCH_VERSION="${ELASTICSEARCH_VERSION}" \
5455
ES_JAVA_OPTS="-Xms128m -Xmx128m"
5556

5657
RUN rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch \
57-
&& yum -y install \
58+
&& dnf -y install \
5859
"https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-${ELASTICSEARCH_VERSION}.rpm" \
5960
&& /usr/share/elasticsearch/bin/elasticsearch-plugin install analysis-phonetic \
6061
&& /usr/share/elasticsearch/bin/elasticsearch-plugin install analysis-icu \
@@ -63,7 +64,7 @@ RUN rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch \
6364
&& sed '/cluster\.initial_master_nodes/d' -i /etc/elasticsearch/elasticsearch.yml \
6465
# Disable xpack security if enabled
6566
&& sed -i 's/^xpack.security.enabled: true/xpack.security.enabled: false/' -i /etc/elasticsearch/elasticsearch.yml \
66-
&& yum clean all
67+
&& dnf clean all
6768

6869
ARG MYSQL_FLAVOR="mariadb"
6970
ENV MYSQL_FLAVOR="${MYSQL_FLAVOR}"
@@ -76,42 +77,43 @@ ENV MYSQL_VERSION="${MYSQL_VERSION}"
7677

7778
RUN set -exuo pipefail ; \
7879
if [ "$MYSQL_FLAVOR" = "mariadb" ];then \
79-
rpm --import https://yum.mariadb.org/RPM-GPG-KEY-MariaDB \
80-
&& echo -e "[mariadb]\nname = MariaDB\nbaseurl = http://yum.mariadb.org/${MARIADB_VERSION}/centos7-amd64\ngpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB\ngpgcheck=1\nenabled=1" > /etc/yum.repos.d/MariaDB.repo \
81-
&& yum -y install MariaDB-server MariaDB-client \
80+
rpm --import https://dnf.mariadb.org/RPM-GPG-KEY-MariaDB \
81+
&& echo -e "[mariadb]\nname = MariaDB\nbaseurl = http://dnf.mariadb.org/${MARIADB_VERSION}/rocky9-amd64\ngpgkey=https://dnf.mariadb.org/RPM-GPG-KEY-MariaDB\ngpgcheck=1\nenabled=1" > /etc/dnf.repos.d/MariaDB.repo \
82+
&& dnf -y install MariaDB-server MariaDB-client \
8283
&& rm -rf /var/lib/mysql; \
8384
elif [ "$MYSQL_FLAVOR" = "mysql" ];then \
8485
if [ "$MYSQL_VERSION" = "8.0" ];then \
85-
MYSQL_FILENAME=mysql80-community-release-el7-11.noarch.rpm; \
86-
MYSQL_MD5=42048ccae58835e40e37b68a3f8b91fb; \
86+
MYSQL_FILENAME=mysql80-community-release-el9-5.noarch.rpm; \
87+
MYSQL_MD5=4fa11545b76db63df0efe852e28c4d6b; \
8788
else \
8889
echo "Uknown mysql version"; \
8990
exit 1; \
9091
fi; \
9192
curl -sLf "https://dev.mysql.com/get/$MYSQL_FILENAME" -o "$MYSQL_FILENAME" \
9293
&& echo "$MYSQL_MD5 $MYSQL_FILENAME" md5sum -c \
93-
&& yum install -y "$MYSQL_FILENAME" \
94+
&& dnf install -y "$MYSQL_FILENAME" \
9495
&& rm "$MYSQL_FILENAME" \
95-
&& yum install -y mysql-server; \
96+
&& dnf install -y mysql-server; \
9697
else \
9798
echo "Unknown MYSQL_FLAVOR=${MYSQL_FLAVOR}"; \
9899
exit 1; \
99100
fi; \
100-
yum clean all
101+
dnf clean all
101102

102-
ARG PHP_VERSION="74"
103+
ARG PHP_VERSION="7.4"
103104
ENV PHP_VERSION="${PHP_VERSION}"
104105

105106
RUN rpm --import https://rpms.remirepo.net/RPM-GPG-KEY-remi \
106-
&& yum -y install https://rpms.remirepo.net/enterprise/remi-release-7.rpm \
107-
&& yum-config-manager --enable "remi-php${PHP_VERSION}" \
108-
&& yum -y install \
107+
&& dnf -y install https://rpms.remirepo.net/enterprise/remi-release-9.rpm \
108+
&& dnf -y module enable "php:remi-${PHP_VERSION}" \
109+
&& dnf -y install \
109110
php php-gd php-pdo php-sodium php-json php-mysqlnd \
110111
php-soap php-xmlrpc php-xml php-intl php-mcrypt \
111112
php-mysql php-mbstring php-zip php-bcmath \
112113
php-opcache php-imagick php-curl php-gmp \
113-
php-pecl-apcu-bc php-pecl-redis php-pecl-zip \
114-
&& yum clean all
114+
php-pecl-redis php-pecl-zip \
115+
&& if [ "$PHP_VERSION" = "7.4" ];then dnf -y install php74-php-pecl-apcu-bc; fi \
116+
&& dnf clean all
115117

116118
ENV COMPOSER_HOME="/opt/composer"
117119
ARG COMPOSER_VERSION="1"

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,14 @@ See [all tags](https://github.com/mageops/docker-magento-run-tests/pkgs/containe
3131
- `stable` - latest tag named `vX.Y`
3232

3333
## Notable versions
34-
| Version | Docker tag | PHP | DB| Elasticsearch | Composer version |
3534
| --- | --- | ---: | ---: | ---: | ---: |
36-
| **php80-es7-mysql80** | _php80-es7-mysql80-stable_ | 8.0.X | Mysql 8.0 | 7.17.3 | 2 |
37-
| **php81-es7-mysql80** | _php81-es7-mysql80-stable_ | 8.1.X | Mysql 8.0 | 7.17.3 | 2 |
38-
| **php82-es84-mysql80** | _php82-es84-mysql80-stable_ | 8.2.X | Mysql 8.0 | 8.4.3 | 2 |
39-
| **php83-es811-mysql80** | _php83-es811-mysql80-stable_ | 8.3.X | Mysql 8.0 | 8.11.4 | 2 |
35+
| **rl9-php80-es7-mysql80** | _rl9-php80-es7-mysql80-stable_ | 8.0.X | Mysql 8.0 | 7.17.3 | 2 |
36+
| **rl9-php81-es7-mysql80** | _rl9-php81-es7-mysql80-stable_ | 8.1.X | Mysql 8.0 | 7.17.3 | 2 |
37+
| **rl9-php82-es84-mysql80** | _rl9-php82-es84-mysql80-stable_ | 8.2.X | Mysql 8.0 | 8.4.3 | 2 |
38+
| **rl9-php83-es811-mysql80** | _rl9-php83-es811-mysql80-stable_ | 8.3.X | Mysql 8.0 | 8.11.4 | 2 |
4039

4140
_Note: The `exec` mount opt on `/tmp` is needed for elasticsearch because it maps mem to temp files._
42-
_The image is big and there's not really a way around it since it has a lot of software and is based on CentOS (which we use for local dev / production deployments, so we want to keep everything else close)._
41+
_The image is big and there's not really a way around it since it has a lot of software and is based on RockyLinux (which we use for local dev / production deployments, so we want to keep everything else close)._
4342

4443
## Basic usage
4544

hooks/build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ set -x
44

55
. hooks/variants
66

7-
build_main
7+
# build_main
88
build_variants

hooks/push

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ else
1010
export DOCKER_TAG="latest"
1111
fi
1212

13-
push_main
13+
# push_main
1414
push_variants

hooks/variants

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ if [[ ! -z "$DOCKER_BUILD_CACHE_FROM" ]] ; then
2323
fi
2424

2525
IMAGE_VARIANTS=(
26-
'VARIANT_NAME="php80-es7-mysql80" ; PHP_VERSION="8.0" ; ELASTICSEARCH_VERSION="7.17.3-x86_64" ; MYSQL_VERSION="8.0" ; COMPOSER_VERSION=2 ; MYSQL_FLAVOR=mysql'
27-
'VARIANT_NAME="php81-es7-mysql80" ; PHP_VERSION="8.1" ; ELASTICSEARCH_VERSION="7.17.3-x86_64" ; MYSQL_VERSION="8.0" ; COMPOSER_VERSION=2 ; MYSQL_FLAVOR=mysql'
28-
'VARIANT_NAME="php82-es84-mysql80" ; PHP_VERSION="8.2" ; ELASTICSEARCH_VERSION="8.4.3-x86_64" ; MYSQL_VERSION="8.0" ; COMPOSER_VERSION=2 ; MYSQL_FLAVOR=mysql'
29-
'VARIANT_NAME="php83-es811-mysql80" ; PHP_VERSION="8.3" ; ELASTICSEARCH_VERSION="8.11.4-x86_64" ; MYSQL_VERSION="8.0" ; COMPOSER_VERSION=2 ; MYSQL_FLAVOR=mysql'
26+
'VARIANT_NAME="rl9-php80-es7-mysql80" ; PHP_VERSION="8.0" ; ELASTICSEARCH_VERSION="7.17.3-x86_64" ; MYSQL_VERSION="8.0" ; COMPOSER_VERSION=2 ; MYSQL_FLAVOR=mysql'
27+
'VARIANT_NAME="rl9-php81-es7-mysql80" ; PHP_VERSION="8.1" ; ELASTICSEARCH_VERSION="7.17.3-x86_64" ; MYSQL_VERSION="8.0" ; COMPOSER_VERSION=2 ; MYSQL_FLAVOR=mysql'
28+
'VARIANT_NAME="rl9-php82-es84-mysql80" ; PHP_VERSION="8.2" ; ELASTICSEARCH_VERSION="8.4.3-x86_64" ; MYSQL_VERSION="8.0" ; COMPOSER_VERSION=2 ; MYSQL_FLAVOR=mysql'
29+
'VARIANT_NAME="rl9-php83-es811-mysql80" ; PHP_VERSION="8.3" ; ELASTICSEARCH_VERSION="8.11.4-x86_64" ; MYSQL_VERSION="8.0" ; COMPOSER_VERSION=2 ; MYSQL_FLAVOR=mysql'
3030
)
3131

3232
function generate_table() {
@@ -92,7 +92,7 @@ function build_variants() {
9292
" Building $VARIANT_NAME\n" \
9393
"==============================\n\n"
9494
build_parametrized "$VARIANT_NAME" \
95-
--build-arg PHP_VERSION="${PHP_VERSION//./}" \
95+
--build-arg PHP_VERSION="${PHP_VERSION}" \
9696
--build-arg ELASTICSEARCH_VERSION="$ELASTICSEARCH_VERSION" \
9797
--build-arg MARIADB_VERSION="${MARIADB_VERSION:-}" \
9898
--build-arg MYSQL_VERSION="${MYSQL_VERSION:-}" \

0 commit comments

Comments
 (0)