一个可行的docker部署方案

This commit is contained in:
tianxin
2025-04-23 20:34:41 +08:00
parent a433003f74
commit 18b231e637
24 changed files with 1663 additions and 118 deletions

19
docker/nginx/Dockerfile Normal file
View File

@@ -0,0 +1,19 @@
FROM nginx:alpine
RUN apk add --no-cache bash
ARG TZ=Asia/Shanghai
RUN \
sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories && \
apk update && \
apk add tzdata
RUN ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime && \
echo '${TZ}' > /etc/timezone
RUN rm -rf /etc/nginx/conf.d/*
RUN mkdir /opt/dist
COPY ./dist /opt/dist
COPY ./conf/nginx.conf /etc/nginx/conf.d
CMD ["nginx","-g","daemon off;"]