FROM nginx:latest
MAINTAINER hrhx
# 传参数据
ARG PROFILE
ARG OUTPUTDIR
# 将dist文件中的内容复制到 `/usr/share/nginx/html/` 这个目录下面
COPY ${OUTPUTDIR}/ /usr/share/nginx/html/${OUTPUTDIR}/
# 用本地配置文件来替换nginx镜像里的默认配置
COPY nginx/nginx-${PROFILE}.conf /etc/nginx/nginx.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

