snowy/Dockerfile-Console

14 lines
555 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

FROM registry.cn-beijing.aliyuncs.com/mojiong/nginx:latest
ENV VAR_HOST Snowy-API
#RUN apt-get update && apt-get install -y vim
# 将本地的 html 文件添加到容器中并
COPY snowy-admin-web/dist/ /usr/share/nginx/html
# 复制反向代理文件
COPY snowy-admin-web/nginx.conf /etc/nginx/conf.d/default.conf
# 反向代理的域名替换
RUN sed -i "s/\CONTAINER-HOST/${VAR_HOST}/g" /etc/nginx/conf.d/default.conf
# 暴露容器的端口nginx默认端口为 80
EXPOSE 80
# 设置容器启动时运行的命令
CMD ["nginx", "-g", "daemon off;"]