fix(docker): align www-data UID/GID with host (1000:1000)
All checks were successful
Deploy Max Bot Test / deploy (push) Successful in 38s
All checks were successful
Deploy Max Bot Test / deploy (push) Successful in 38s
php-fpm runs workers as www-data, so master stays root and drops to a UID matching host files. storage bind-mount is writable without runtime chmod hacks. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -1,13 +1,19 @@
|
||||
FROM php:8.4-fpm-alpine AS base
|
||||
|
||||
ARG HOST_UID=1000
|
||||
ARG HOST_GID=1000
|
||||
|
||||
RUN apk add --no-cache \
|
||||
libzip-dev \
|
||||
zlib-dev \
|
||||
unzip \
|
||||
git \
|
||||
curl \
|
||||
shadow \
|
||||
&& docker-php-ext-install zip pcntl \
|
||||
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
||||
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
|
||||
&& groupmod -g $HOST_GID www-data \
|
||||
&& usermod -u $HOST_UID -g $HOST_GID www-data
|
||||
|
||||
WORKDIR /var/www/html
|
||||
|
||||
|
||||
Reference in New Issue
Block a user