在docker中部署centos7镜像

在docker中部署centos7镜像

本篇文章参考自:

https://www.cnblogs.com/linjj/p/5606911.html

https://blog.csdn.net/u012767761/article/details/78107870

1、安装Docker for Windows,点击https://store.docker.com/editions/community/docker-ce-desktop-windows进入下载

2、建立centos7镜像库,可到网易蜂巢选择一份Dockerfile复制,网址为

3、将复制的内容放到新建的Dockerfile文件中,这个文件需要自己创建,但注意这个文件不要加上后缀

这里我复制的内容为:

FROM hub.c.163.com/public/centos:7.2.1511 RUN yum clean all RUN yum install -y yum-plugin-ovl || true RUN yum install -y vim tar wget curl rsync bzip2 iptables tcpdump less telnet net-tools lsof sysstat cronie python-setuptools RUN yum clean all RUN easy_install supervisor RUN cp -f /usr/share/zoneinfo/Asia/Shanghai /etc/localtime EXPOSE 22 RUN mkdir -p /etc/supervisor/conf.d/ RUN /usr/bin/echo_supervisord_conf > /etc/supervisord.conf RUN echo [include] >> /etc/supervisord.conf RUN echo \'files = /etc/supervisor/conf.d/*.conf\' >> /etc/supervisord.conf COPY sshd.conf /etc/supervisor/conf.d/sshd.conf CMD ["/usr/bin/supervisord"]

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/zzjggp.html