码迷,mamicode.com
首页 > 其他好文 > 详细

docker 2--dockerfile

时间:2018-04-24 15:37:03      阅读:138      评论:0      收藏:0      [点我收藏+]

标签:move   auto   share   nbsp   get   apt   注意   清理   col   

编写dockerfile

Dockerfile内容

1个run为1层文件层,注意清理不必要的安装包。

From nginx
RUN echo hello123 > /usr/share/nginx/html/index.html   && echo 123
 #&& apt-get install -y $buildDeps
 #&& apt-get purge -y --auto-remove $buildDeps

创建image

docker build -t nginx:v3 .

 

docker 2--dockerfile

标签:move   auto   share   nbsp   get   apt   注意   清理   col   

原文地址:https://www.cnblogs.com/infaaf/p/8930824.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!