mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-24 03:57:27 +08:00
chore: 修复docker环境该用非root运行时全挂载和sqlite部署报错并减少layers
This commit is contained in:
+5
-6
@@ -2,17 +2,16 @@ FROM phpswoole/swoole:php8.1-alpine
|
||||
|
||||
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
|
||||
|
||||
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
|
||||
RUN install-php-extensions pcntl bcmath \
|
||||
&& apk --no-cache add shadow supervisor nginx sqlite nginx-mod-http-brotli mysql-client git \
|
||||
&& addgroup -S -g 1000 www && adduser -S -G www -u 1000 www
|
||||
#复制项目文件以及配置文件
|
||||
WORKDIR /www
|
||||
COPY .docker /
|
||||
COPY . /www
|
||||
RUN composer install --optimize-autoloader --no-cache --no-dev \
|
||||
&& php artisan storage:link \
|
||||
&& chown -R www:www /www
|
||||
&& chown -R www:www /www \
|
||||
&& chmod -R 777 /www
|
||||
|
||||
CMD [ "/usr/bin/supervisord", "--nodaemon", "-c" ,"/etc/supervisor/supervisord.conf" ]
|
||||
Reference in New Issue
Block a user