This commit is contained in:
小王 2024-09-12 22:45:03 +08:00
parent c7a5ffb9c1
commit 9cbfe2e336
2 changed files with 22 additions and 1 deletions

View File

@ -1,3 +1,18 @@
FROM php:8.2.16-cli-alpine3.19
CMD ["php", "-f", "/var/www/html/start.php"]
LABEL org.opencontainers.image.authors="anfu"
RUN apk add --no-cache nginx
VOLUME /var/www/html
ENV NACOS_ADDR="192.168.1.105:8848" \
SERVER_ADDR="192.168.1.161:80"
COPY . /var/www/html
WORKDIR /var/www/html
EXPOSE 80
ENTRYPOINT ["/run.sh"]

6
run.sh Normal file
View File

@ -0,0 +1,6 @@
#!/bin/sh
# 后台启动
php-fpm -D
# 关闭后台启动hold住进程
nginx -g 'daemon off;'