FROM biyi/biyi-nginx:1.18-vts
COPY ./dist /usr/share/nginx/html
RUN wget -O default.conf http://xxx/pub/default.conf
COPY ./default.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
RUN chmod 777 -R /usr/share/nginx
RUN chmod 777 -R /etc/nginx/conf.d
CMD ["nginx", "-g", "daemon off;"]

或者:

FROM nginx:stable-alpine
COPY ./dist /usr/share/nginx/html
RUN wget -O ./default.conf http://xxx/pub/default-hndxoabiyi.conf
RUN cp ./default.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
RUN chmod 777 -R /usr/share/nginx
RUN chmod 777 -R /etc/nginx/conf.d
CMD ["nginx", "-g", "daemon off;"]

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐