File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -189,6 +189,8 @@ services:
189189 - INSTALL_BCMATH=${PHP_WORKER_INSTALL_BCMATH}
190190 - INSTALL_SOAP=${PHP_WORKER_INSTALL_SOAP}
191191 - INSTALL_ZIP_ARCHIVE=${PHP_WORKER_INSTALL_ZIP_ARCHIVE}
192+ - PUID=${PHP_WORKER_PUID}
193+ - PGID=${PHP_WORKER_PGID}
192194 volumes :
193195 - ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
194196 - ./php-worker/supervisord.d:/etc/supervisord.d
Original file line number Diff line number Diff line change @@ -172,6 +172,8 @@ PHP_WORKER_INSTALL_PGSQL=false
172172PHP_WORKER_INSTALL_BCMATH=false
173173PHP_WORKER_INSTALL_SOAP=false
174174PHP_WORKER_INSTALL_ZIP_ARCHIVE=false
175+ PHP_WORKER_PUID=1000
176+ PHP_WORKER_PGID=1000
175177
176178### NGINX #################################################
177179
Original file line number Diff line number Diff line change @@ -25,6 +25,15 @@ RUN apk --update add wget \
2525RUN docker-php-ext-install mysqli mbstring pdo pdo_mysql tokenizer xml pcntl
2626RUN pecl channel-update pecl.php.net && pecl install memcached mcrypt-1.0.1 && docker-php-ext-enable memcached
2727
28+ # Add a non-root user:
29+ ARG PUID=1000
30+ ENV PUID ${PUID}
31+ ARG PGID=1000
32+ ENV PGID ${PGID}
33+
34+ RUN addgroup -g ${PGID} laradock && \
35+ adduser -D -G laradock -u ${PUID} laradock
36+
2837# Install SOAP package:
2938ARG INSTALL_SOAP=false
3039RUN if [ ${INSTALL_SOAP} = true ]; then \
Original file line number Diff line number Diff line change @@ -4,4 +4,5 @@ command=php /var/www/artisan queue:work --sleep=3 --tries=3 --daemon
44autostart=true
55autorestart=true
66numprocs=8
7+ user=laradock
78redirect_stderr=true
You can’t perform that action at this time.
0 commit comments