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

centos7.4-tools封装之Dockerfile

时间:2020-04-08 19:17:14      阅读:84      评论:0      收藏:0      [点我收藏+]

标签:local   ESS   curl -O   centos   localtime   mis   封装   auth   set   

FROM hub.c.163.com/library/centos:7.4.1708
MAINTAINER <author@126.com>
LABEL version="centos:7.4.1708-tools" author="<author@126.com>"
RUN curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo
RUN yum install -y vim wget curl bzip2 unzip tcpdump bash-completion dos2unix psmisc \
tcpdump less telnet net-tools lsof sysstat python-setuptools lrzsz ntpdate 
RUN ln -fs ../usr/share/zoneinfo/Asia/Shanghai /etc/localtime
EXPOSE 22
CMD ["/usr/sbin/sshd", "-D"]

封装镜像
docker build -t centos:7.4-tools .

使用下面命令可以查看上面定义的标签。
docker inspect -f "{{ .Config.Labels }}" centos:7.4-tools

centos7.4-tools封装之Dockerfile

标签:local   ESS   curl -O   centos   localtime   mis   封装   auth   set   

原文地址:https://www.cnblogs.com/outsrkem/p/12661625.html

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