Skip to content

Commit 3eff51b

Browse files
Ayeshboite
authored andcommitted
fix(Docker): update ENV syntax to use key=value format #0000
The `Dockerfile` reference[^1] discourages the use of `ENV key val` format, and recommends the `ENV key=val` format. This commit replaces the `LegacyKeyValueFormat` to the new format to avoid the deprecation notices. [^1]: https://docs.docker.com/reference/dockerfile/#env
1 parent 4db0301 commit 3eff51b

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

Dockerfile.php7

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ FROM php:7-apache
22

33
EXPOSE 80
44

5-
ENV APACHE_RUN_USER www-data
6-
ENV APACHE_RUN_GROUP www-data
7-
ENV APACHE_LOCK_DIR /var/lock/apache2
8-
ENV APACHE_LOG_DIR /var/log/apache2
9-
ENV APACHE_PID_FILE /var/run/apache2/apache2.pid
10-
ENV APACHE_SERVER_NAME php-docker-base-linkorb
5+
ENV APACHE_RUN_USER=www-data
6+
ENV APACHE_RUN_GROUP=www-data
7+
ENV APACHE_LOCK_DIR=/var/lock/apache2
8+
ENV APACHE_LOG_DIR=/var/log/apache2
9+
ENV APACHE_PID_FILE=/var/run/apache2/apache2.pid
10+
ENV APACHE_SERVER_NAME=php-docker-base-linkorb
1111

1212
COPY ./php.ini-production "$PHP_INI_DIR/php.ini"
1313

Dockerfile.php8

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ FROM php:8.3-apache
22

33
EXPOSE 80
44

5-
ENV APACHE_RUN_USER www-data
6-
ENV APACHE_RUN_GROUP www-data
7-
ENV APACHE_LOCK_DIR /var/lock/apache2
8-
ENV APACHE_LOG_DIR /var/log/apache2
9-
ENV APACHE_PID_FILE /var/run/apache2/apache2.pid
10-
ENV APACHE_SERVER_NAME php-docker-base-linkorb
5+
ENV APACHE_RUN_USER=www-data
6+
ENV APACHE_RUN_GROUP=www-data
7+
ENV APACHE_LOCK_DIR=/var/lock/apache2
8+
ENV APACHE_LOG_DIR=/var/log/apache2
9+
ENV APACHE_PID_FILE=/var/run/apache2/apache2.pid
10+
ENV APACHE_SERVER_NAME=php-docker-base-linkorb
1111

1212
COPY ./php.ini-production "$PHP_INI_DIR/php.ini"
1313

0 commit comments

Comments
 (0)