jenkins部署web项目

时间:2023-03-08 20:01:33
jenkins部署web项目

Dockerfile

FROM nginx:latest

#MAINTAINER 维护者信息
MAINTAINER GosingWu 1649346712@qq.com ADD admin_test.conf /etc/nginx/conf.d/ ADD admin /usr/share/nginx/html/admin # 暴露的端口
EXPOSE 8080 #CMD 运行以下命令,daemon off后台运行,否则启动完就自动关闭
CMD ["nginx", "-g", "daemon off;"]

nginx配置

admin_test.conf
server {
listen 8080;
server_name localhost;
location /admin {
root /usr/share/nginx/html;
}
}