2024-09-12 22:55:32 +08:00
|
|
|
FROM php:8.2.16-fpm-alpine3.19
|
2024-09-12 22:11:31 +08:00
|
|
|
|
2024-09-12 22:45:03 +08:00
|
|
|
LABEL org.opencontainers.image.authors="anfu"
|
|
|
|
|
2024-09-13 00:01:47 +08:00
|
|
|
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
|
2024-09-12 22:45:03 +08:00
|
|
|
|
|
|
|
VOLUME /var/www/html
|
|
|
|
|
|
|
|
ENV NACOS_ADDR="192.168.1.105:8848" \
|
2024-09-13 11:00:44 +08:00
|
|
|
SERVICE_ADDR="192.168.1.161:8000"
|
2024-09-12 22:45:03 +08:00
|
|
|
|
2024-09-12 22:53:36 +08:00
|
|
|
ADD run.sh /run.sh
|
|
|
|
ADD default.conf /etc/nginx/http.d/default.conf
|
|
|
|
|
|
|
|
RUN chmod +x /run.sh
|
2024-09-12 22:45:03 +08:00
|
|
|
|
2024-09-12 22:53:36 +08:00
|
|
|
COPY . /var/www/html
|
2024-09-13 10:15:29 +08:00
|
|
|
|
|
|
|
RUN rm -rf /var/www/html/.env
|
|
|
|
|
2024-09-12 22:45:03 +08:00
|
|
|
WORKDIR /var/www/html
|
|
|
|
|
2024-09-12 22:53:36 +08:00
|
|
|
RUN chown www-data:www-data -R /var/www/html
|
|
|
|
|
2024-09-12 22:45:03 +08:00
|
|
|
EXPOSE 80
|
|
|
|
|
2024-09-13 00:01:47 +08:00
|
|
|
CMD ["/run.sh"]
|