docker build 时传入动态参数
docker build 时传入动态参数[root@fangjike temp]# cat DockerfileFROM python:2.7-slimCOPY startup.sh /optRUN chmod +x /opt/startup.shARG envType=default_valueENV envType ${envType}CMD ["/opt/startu...
·
docker build 时传入动态参数
[root@fangjike temp]# cat Dockerfile
FROM python:2.7-slim
COPY startup.sh /opt
RUN chmod +x /opt/startup.sh
ARG envType=default_value
ENV envType ${envType}
CMD ["/opt/startup.sh","${envType}"]
# docker build -t yellow:2.0 --build-arg envType=dev .
更多推荐
已为社区贡献27条内容
所有评论(0)