Skip to content

Commit

Permalink
Update users
Browse files Browse the repository at this point in the history
  • Loading branch information
tfirdaus committed Aug 28, 2024
1 parent 228e536 commit 4fbff8e
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion php/8.2/fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ RUN install-php-extensions 'xdebug-${PHP_XDEBUG_VERSION}'; \
RUN mkdir -p /var/www/.vscode-server; \
chown -R www-data:www-data /var/www/.vscode-server

# Switch back to an underpreviliged user.
# Switch back to an underpreviliged user.
USER www-data
7 changes: 7 additions & 0 deletions wp/php7.4/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ ENV WP_CORE_DOWNLOAD=true
ENV WP_VERSION=latest
ENV WP_LOCALE=en_US

# The `serversideup/php` image is underprivileged by default.
# Switch to root to install dependencies and PHP extensions.
USER root

# Install additional packages.
# The "ghostscript" is required for rendering PDF previews
# The "default-mysql-client" for WP-CLI "wp db" command to run properly that otherwise throws "'mysqlcheck': No such file or directory."
Expand All @@ -30,3 +34,6 @@ RUN set -eux; \
echo "path: /var/www/html" > /var/www/.wp-cli/config.yml; \
chown -R www-data:www-data /var/www/.wp-cli; \
wp cli info;

# Switch back to an underpreviliged user.
USER www-data
7 changes: 7 additions & 0 deletions wp/php8.0/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ ENV WP_CORE_DOWNLOAD=true
ENV WP_VERSION=latest
ENV WP_LOCALE=en_US

# The `serversideup/php` image is underprivileged by default.
# Switch to root to install dependencies and PHP extensions.
USER root

# Install additional packages.
# The "ghostscript" is required for rendering PDF previews
# The "default-mysql-client" for WP-CLI "wp db" command to run properly that otherwise throws "'mysqlcheck': No such file or directory."
Expand All @@ -30,3 +34,6 @@ RUN set -eux; \
echo "path: /var/www/html" > /var/www/.wp-cli/config.yml; \
chown -R www-data:www-data /var/www/.wp-cli; \
wp cli info;

# Switch back to an underpreviliged user.
USER www-data
7 changes: 7 additions & 0 deletions wp/php8.1/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ ENV WP_CORE_DOWNLOAD=true
ENV WP_VERSION=latest
ENV WP_LOCALE=en_US

# The `serversideup/php` image is underprivileged by default.
# Switch to root to install dependencies and PHP extensions.
USER root

# Install additional packages.
# The "ghostscript" is required for rendering PDF previews
# The "default-mysql-client" for WP-CLI "wp db" command to run properly that otherwise throws "'mysqlcheck': No such file or directory."
Expand All @@ -30,3 +34,6 @@ RUN set -eux; \
echo "path: /var/www/html" > /var/www/.wp-cli/config.yml; \
chown -R www-data:www-data /var/www/.wp-cli; \
wp cli info;

# Switch back to an underpreviliged user.
USER www-data
7 changes: 7 additions & 0 deletions wp/php8.2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ ENV WP_CORE_DOWNLOAD=true
ENV WP_VERSION=latest
ENV WP_LOCALE=en_US

# The `serversideup/php` image is underprivileged by default.
# Switch to root to install dependencies and PHP extensions.
USER root

# Install additional packages.
# The "ghostscript" is required for rendering PDF previews
# The "default-mysql-client" for WP-CLI "wp db" command to run properly that otherwise throws "'mysqlcheck': No such file or directory."
Expand All @@ -30,3 +34,6 @@ RUN set -eux; \
echo "path: /var/www/html" > /var/www/.wp-cli/config.yml; \
chown -R www-data:www-data /var/www/.wp-cli; \
wp cli info;

# Switch back to an underpreviliged user.
USER www-data

0 comments on commit 4fbff8e

Please sign in to comment.