标签:ngx ted pac 定义 center 之间 tools 映射 tor
DockerFile是用来构建Docker镜像的构建文件,是由一系列命令和参数构成的脚本。
构建三步骤:
l 编写DockerFile文件
l docker build
l docker run
vi myCentOS.df
FROM centos MAINTAINER gongxr
ENV MYPATH /usr/local WORKDIR $MYPATH
RUN yum -y install vim RUN yum -y install net-tools
EXPOSE 22 80
CMD echo "----success----" CMD ["/bin/bash"] |
docker build -f ./myCentOS.df -t mycentos:1.1 . |
docker run -it --name mycentos -P mycentos:1.1 |
docker history 24cfa63644dc #镜像ID |
docker history mycentos:1.1 --no-trunc #完整显示 |
[root@localhost dockerFile]# docker history mycentos:1.1 IMAGE CREATED CREATED BY SIZE COMMENT 1a829f894153 About a minute ago /bin/sh -c #(nop) CMD ["/bin/bash"] 0 B d270ce700b5e 24 minutes ago /bin/sh -c #(nop) CMD ["/bin/sh" "-c" "ec... 0 B 556fea5422a4 24 minutes ago /bin/sh -c #(nop) EXPOSE 22/tcp 80/tcp 0 B 35cb1da810fe 24 minutes ago /bin/sh -c yum -y install net-tools 22.9 MB 897c2d62f01f 25 minutes ago /bin/sh -c yum -y install vim 57.3 MB b5932f89e3d0 26 minutes ago /bin/sh -c #(nop) WORKDIR /usr/local 0 B d5437421e4ec 26 minutes ago /bin/sh -c #(nop) ENV MYPATH=/usr/local 0 B 812bb1aa5cab 26 minutes ago /bin/sh -c #(nop) MAINTAINER gongxr 0 B 0d120b6ccaa8 2 weeks ago /bin/sh -c #(nop) CMD ["/bin/bash"] 0 B <missing> 2 weeks ago /bin/sh -c #(nop) LABEL org.label-schema.... 0 B <missing> 2 weeks ago /bin/sh -c #(nop) ADD file:538afc0c5c964ce... 215 MB |
标签:ngx ted pac 定义 center 之间 tools 映射 tor
原文地址:https://www.cnblogs.com/gongxr/p/13563152.html