chore: docker环境修改php为非root运行

This commit is contained in:
xboard
2024-04-11 20:37:46 +08:00
parent 39b4218349
commit 03706c054d
4 changed files with 5 additions and 4 deletions
+2 -1
View File
@@ -6,12 +6,13 @@ RUN install-php-extensions pcntl bcmath
RUN apk --no-cache add shadow supervisor nginx sqlite nginx-mod-http-brotli mysql-client git
RUN addgroup -S -g 1001 www && adduser -S -G www -u 1001 www
#复制项目文件以及配置文件
WORKDIR /www
COPY .docker /
COPY . /www
RUN composer install --optimize-autoloader --no-cache --no-dev \
&& php artisan storage:link \
&& chmod -R 777 ./
&& chown -R www:www /www
CMD [ "/usr/bin/supervisord", "--nodaemon", "-c" ,"/etc/supervisor/supervisord.conf" ]