Skip to content

Commit 10fd875

Browse files
FaramosCZphracek
authored andcommitted
[bugfix] The version must be set in a separate stage, so it can be re-used in the other calls
otherwise it's not available when the rest of the ENV block is processed and the ENV values relying on this variable are malformed. This commit was mistakenly reverted as a part of revert of a different change
1 parent c932a6b commit 10fd875

File tree

8 files changed

+48
-40
lines changed

8 files changed

+48
-40
lines changed

8.0/Dockerfile.c9s

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@ FROM quay.io/sclorg/s2i-core-c9s:c9s
1010
# * $MYSQL_DATABASE - Name of the database to create
1111
# * $MYSQL_ROOT_PASSWORD (Optional) - Password for the 'root' MySQL account
1212

13+
# Standalone ENV call so these values can be re-used in the other ENV calls
1314
ENV MYSQL_VERSION=8.0 \
14-
MYSQL_SHORT_VERSION=80 \
15-
APP_DATA=/opt/app-root/src \
16-
HOME=/var/lib/mysql \
17-
NAME=mysql
15+
MYSQL_SHORT_VERSION=80
1816

19-
ENV SUMMARY="MySQL ${MYSQL_VERSION} SQL database server" \
17+
ENV APP_DATA=/opt/app-root/src \
18+
HOME=/var/lib/mysql \
19+
NAME=mysql \
20+
SUMMARY="MySQL ${MYSQL_VERSION} SQL database server" \
2021
DESCRIPTION="MySQL is a multi-user, multi-threaded SQL database server. The container \
2122
image provides a containerized packaging of the MySQL mysqld daemon and client application. \
2223
The mysqld server daemon accepts connections from clients and provides access to content from \

8.0/Dockerfile.fedora

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@ FROM quay.io/fedora/s2i-core:42
1010
# * $MYSQL_DATABASE - Name of the database to create
1111
# * $MYSQL_ROOT_PASSWORD (Optional) - Password for the 'root' MySQL account
1212

13+
# Standalone ENV call so these values can be re-used in the other ENV calls
1314
ENV MYSQL_VERSION=8.0 \
14-
MYSQL_SHORT_VERSION=80 \
15-
APP_DATA=/opt/app-root/src \
16-
HOME=/var/lib/mysql \
17-
NAME=mysql
15+
MYSQL_SHORT_VERSION=80
1816

19-
ENV SUMMARY="MySQL ${MYSQL_VERSION} SQL database server" \
17+
ENV APP_DATA=/opt/app-root/src \
18+
HOME=/var/lib/mysql \
19+
NAME=mysql \
20+
SUMMARY="MySQL ${MYSQL_VERSION} SQL database server" \
2021
DESCRIPTION="MySQL is a multi-user, multi-threaded SQL database server. The container \
2122
image provides a containerized packaging of the MySQL mysqld daemon and client application. \
2223
The mysqld server daemon accepts connections from clients and provides access to content from \

8.0/Dockerfile.rhel9

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@ FROM ubi9/s2i-core
1010
# * $MYSQL_DATABASE - Name of the database to create
1111
# * $MYSQL_ROOT_PASSWORD (Optional) - Password for the 'root' MySQL account
1212

13+
# Standalone ENV call so these values can be re-used in the other ENV calls
1314
ENV MYSQL_VERSION=8.0 \
14-
MYSQL_SHORT_VERSION=80 \
15-
APP_DATA=/opt/app-root/src \
16-
HOME=/var/lib/mysql \
17-
NAME=mysql
15+
MYSQL_SHORT_VERSION=80
1816

19-
ENV SUMMARY="MySQL ${MYSQL_VERSION} SQL database server" \
17+
ENV APP_DATA=/opt/app-root/src \
18+
HOME=/var/lib/mysql \
19+
NAME=mysql \
20+
SUMMARY="MySQL ${MYSQL_VERSION} SQL database server" \
2021
DESCRIPTION="MySQL is a multi-user, multi-threaded SQL database server. The container \
2122
image provides a containerized packaging of the MySQL mysqld daemon and client application. \
2223
The mysqld server daemon accepts connections from clients and provides access to content from \

8.4/Dockerfile.c10s

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@ FROM quay.io/sclorg/s2i-core-c10s:c10s
1010
# * $MYSQL_DATABASE - Name of the database to create
1111
# * $MYSQL_ROOT_PASSWORD (Optional) - Password for the 'root' MySQL account
1212

13+
# Standalone ENV call so these values can be re-used in the other ENV calls
1314
ENV MYSQL_VERSION=8.4 \
14-
MYSQL_SHORT_VERSION=84 \
15-
APP_DATA=/opt/app-root/src \
16-
HOME=/var/lib/mysql \
17-
NAME=mysql
15+
MYSQL_SHORT_VERSION=84
1816

19-
ENV SUMMARY="MySQL ${MYSQL_VERSION} SQL database server" \
17+
ENV APP_DATA=/opt/app-root/src \
18+
HOME=/var/lib/mysql \
19+
NAME=mysql \
20+
SUMMARY="MySQL ${MYSQL_VERSION} SQL database server" \
2021
DESCRIPTION="MySQL is a multi-user, multi-threaded SQL database server. The container \
2122
image provides a containerized packaging of the MySQL mysqld daemon and client application. \
2223
The mysqld server daemon accepts connections from clients and provides access to content from \

8.4/Dockerfile.c9s

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@ FROM quay.io/sclorg/s2i-core-c9s:c9s
1010
# * $MYSQL_DATABASE - Name of the database to create
1111
# * $MYSQL_ROOT_PASSWORD (Optional) - Password for the 'root' MySQL account
1212

13+
# Standalone ENV call so these values can be re-used in the other ENV calls
1314
ENV MYSQL_VERSION=8.4 \
14-
MYSQL_SHORT_VERSION=84 \
15-
APP_DATA=/opt/app-root/src \
16-
HOME=/var/lib/mysql \
17-
NAME=mysql
15+
MYSQL_SHORT_VERSION=84
1816

19-
ENV SUMMARY="MySQL ${MYSQL_VERSION} SQL database server" \
17+
ENV APP_DATA=/opt/app-root/src \
18+
HOME=/var/lib/mysql \
19+
NAME=mysql \
20+
SUMMARY="MySQL ${MYSQL_VERSION} SQL database server" \
2021
DESCRIPTION="MySQL is a multi-user, multi-threaded SQL database server. The container \
2122
image provides a containerized packaging of the MySQL mysqld daemon and client application. \
2223
The mysqld server daemon accepts connections from clients and provides access to content from \

8.4/Dockerfile.fedora

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@ FROM quay.io/fedora/s2i-core:42
1010
# * $MYSQL_DATABASE - Name of the database to create
1111
# * $MYSQL_ROOT_PASSWORD (Optional) - Password for the 'root' MySQL account
1212

13+
# Standalone ENV call so these values can be re-used in the other ENV calls
1314
ENV MYSQL_VERSION=8.4 \
14-
MYSQL_SHORT_VERSION=84 \
15-
APP_DATA=/opt/app-root/src \
16-
HOME=/var/lib/mysql \
17-
NAME=mysql
15+
MYSQL_SHORT_VERSION=84
1816

19-
ENV SUMMARY="MySQL ${MYSQL_VERSION} SQL database server" \
17+
ENV APP_DATA=/opt/app-root/src \
18+
HOME=/var/lib/mysql \
19+
NAME=mysql \
20+
SUMMARY="MySQL ${MYSQL_VERSION} SQL database server" \
2021
DESCRIPTION="MySQL is a multi-user, multi-threaded SQL database server. The container \
2122
image provides a containerized packaging of the MySQL mysqld daemon and client application. \
2223
The mysqld server daemon accepts connections from clients and provides access to content from \

8.4/Dockerfile.rhel10

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@ FROM ubi10/s2i-core:latest
1010
# * $MYSQL_DATABASE - Name of the database to create
1111
# * $MYSQL_ROOT_PASSWORD (Optional) - Password for the 'root' MySQL account
1212

13+
# Standalone ENV call so these values can be re-used in the other ENV calls
1314
ENV MYSQL_VERSION=8.4 \
14-
MYSQL_SHORT_VERSION=84 \
15-
APP_DATA=/opt/app-root/src \
16-
HOME=/var/lib/mysql \
17-
NAME=mysql
15+
MYSQL_SHORT_VERSION=84
1816

19-
ENV SUMMARY="MySQL ${MYSQL_VERSION} SQL database server" \
17+
ENV APP_DATA=/opt/app-root/src \
18+
HOME=/var/lib/mysql \
19+
NAME=mysql \
20+
SUMMARY="MySQL ${MYSQL_VERSION} SQL database server" \
2021
DESCRIPTION="MySQL is a multi-user, multi-threaded SQL database server. The container \
2122
image provides a containerized packaging of the MySQL mysqld daemon and client application. \
2223
The mysqld server daemon accepts connections from clients and provides access to content from \

8.4/Dockerfile.rhel9

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@ FROM ubi9/s2i-core
1010
# * $MYSQL_DATABASE - Name of the database to create
1111
# * $MYSQL_ROOT_PASSWORD (Optional) - Password for the 'root' MySQL account
1212

13+
# Standalone ENV call so these values can be re-used in the other ENV calls
1314
ENV MYSQL_VERSION=8.4 \
14-
MYSQL_SHORT_VERSION=84 \
15-
APP_DATA=/opt/app-root/src \
16-
HOME=/var/lib/mysql \
17-
NAME=mysql
15+
MYSQL_SHORT_VERSION=84
1816

19-
ENV SUMMARY="MySQL ${MYSQL_VERSION} SQL database server" \
17+
ENV APP_DATA=/opt/app-root/src \
18+
HOME=/var/lib/mysql \
19+
NAME=mysql \
20+
SUMMARY="MySQL ${MYSQL_VERSION} SQL database server" \
2021
DESCRIPTION="MySQL is a multi-user, multi-threaded SQL database server. The container \
2122
image provides a containerized packaging of the MySQL mysqld daemon and client application. \
2223
The mysqld server daemon accepts connections from clients and provides access to content from \

0 commit comments

Comments
 (0)