You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
675 B
Docker
26 lines
675 B
Docker
# 设置基础镜像
|
|
FROM nginx:1.25
|
|
|
|
# 覆盖原镜像的启动脚本
|
|
COPY docs/docker-entrypoint.sh /docker-entrypoint.sh
|
|
RUN chmod 777 /docker-entrypoint.sh
|
|
|
|
# 删除默认的配置文件
|
|
RUN rm /etc/nginx/conf.d/default.conf
|
|
|
|
# 复制配置文件信息
|
|
COPY docs/conf.d/http.conf ./docs/conf.d/https.conf /etc/nginx/conf.d/
|
|
COPY docs/conf.d/nginx.conf /etc/nginx/nginx.conf
|
|
COPY docs/conf.d/servers.conf.template /data/vp/nginx/conf/servers.conf.template
|
|
|
|
# 复制ssl证书信息
|
|
COPY docs/ssl /data/vp/nginx/ssl
|
|
|
|
# 复制静态文件
|
|
COPY html/dist /usr/share/nginx/html/dist
|
|
|
|
# 暴漏服务端口
|
|
EXPOSE 80 443
|
|
|
|
# 设置启动命令
|
|
CMD ["nginx","-g","daemon off;"] |