初识Dockerfile
Dockerfile 就是用来构建docker镜像的构建文件!命令脚本!先体验一下!
通过这个脚本可以生成镜像,镜像是一层一层的,脚本一个个的命令,每个命令都是一层!
#创建一个dockerfile文件,名字可以随机 建议Dockerfile
#文件中的内容 指令(大写) 参数
[root@localhost docker-test-volume]# vim dockerfile1
FORM centos
VOLUME ["volume01","volume02"]
CMD echo "---end---"
CMD /bin/bash
#这里的每个命令,就是镜像的一层

原文链接:http://www.heimajinpai.cn/wordpress/index.php/2022/03/30/docker-2-2/