Run php-cli as www-data on nginx container for compatability.
This commit is contained in:
parent
01675bf4e8
commit
8c7f3f6471
3 changed files with 8 additions and 0 deletions
|
|
@ -29,6 +29,7 @@ COPY self-signed-certificates /certs
|
||||||
RUN apt-get -qq update && \
|
RUN apt-get -qq update && \
|
||||||
# Install pre-dependencies to use apt-key.
|
# Install pre-dependencies to use apt-key.
|
||||||
apt-get -yqq install --no-install-recommends \
|
apt-get -yqq install --no-install-recommends \
|
||||||
|
sudo \
|
||||||
lsb-core \
|
lsb-core \
|
||||||
gnupg \
|
gnupg \
|
||||||
&& \
|
&& \
|
||||||
|
|
@ -107,6 +108,9 @@ RUN apt-get -qq update && \
|
||||||
dos2unix -q /etc/service/*/run && \
|
dos2unix -q /etc/service/*/run && \
|
||||||
# Make sure all our new services are executable
|
# Make sure all our new services are executable
|
||||||
chmod +x /etc/service/*/run && \
|
chmod +x /etc/service/*/run && \
|
||||||
|
# Insert shim for php-cli still running in this nginx container to run as www-data.
|
||||||
|
mv /conf/php-cli-user-shim.sh /usr/local/sbin/php && \
|
||||||
|
chmod +x /usr/local/sbin/php && \
|
||||||
# Cleanup the /conf dir
|
# Cleanup the /conf dir
|
||||||
rm -R /conf && \
|
rm -R /conf && \
|
||||||
# Write the PHP version into some template locations
|
# Write the PHP version into some template locations
|
||||||
|
|
|
||||||
|
|
@ -33,5 +33,6 @@ bake:
|
||||||
$(MAKE) docker-php-core bake-flavours PHP_VERSION=7.3
|
$(MAKE) docker-php-core bake-flavours PHP_VERSION=7.3
|
||||||
$(MAKE) docker-php-core bake-flavours PHP_VERSION=7.4
|
$(MAKE) docker-php-core bake-flavours PHP_VERSION=7.4
|
||||||
$(MAKE) docker-php-core bake-flavours PHP_VERSION=8.0
|
$(MAKE) docker-php-core bake-flavours PHP_VERSION=8.0
|
||||||
|
$(MAKE) docker-php-core bake-flavours PHP_VERSION=8.1
|
||||||
|
|
||||||
all: bake
|
all: bake
|
||||||
3
php/nginx/php-cli-user-shim.sh
Normal file
3
php/nginx/php-cli-user-shim.sh
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/sh
|
||||||
|
sudo -u www-data /usr/bin/php "$*"
|
||||||
|
return $?
|
||||||
Loading…
Reference in a new issue