This commit is contained in:
小王 2024-09-13 00:01:47 +08:00
parent e1873ae55f
commit bfc0ac5b8d
2 changed files with 6 additions and 3 deletions

View File

@ -2,7 +2,10 @@ FROM php:8.2.16-fpm-alpine3.19
LABEL org.opencontainers.image.authors="anfu" LABEL org.opencontainers.image.authors="anfu"
RUN apk add --no-cache nginx RUN set -eux \
&& sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories \
&& apk add --no-cache nginx \
&& docker-php-ext-install pcntl
VOLUME /var/www/html VOLUME /var/www/html
@ -21,4 +24,4 @@ RUN chown www-data:www-data -R /var/www/html
EXPOSE 80 EXPOSE 80
ENTRYPOINT ["/run.sh"] CMD ["/run.sh"]

2
run.sh
View File

@ -5,6 +5,6 @@ php-fpm -D
# 启动nginx # 启动nginx
nginx nginx
# 启动nacos心跳服务 # 启动nacos心跳服务
php ./start.php php ./start.php start > /dev/null
# hold后台 # hold后台
sh sh