1、CentOS7

构建镜像
# cat Dockerfile 
FROM centos:7
MAINTAINER by madongsheng@kaixin-inc.com

RUN yum install -y wget && \
    cd /etc/yum.repos.d/ && rm -f *.repo && \
        wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo && \
        wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo && \
        yum install -y gcc gcc-c++ automake autoconf bash-completion python-pip telnet nmap sshpass tree

CMD ["/bin/bash"]

# docker build -t mycentos:v1 .

使用自己构建的镜像运行容器
# docker run -it -d --name=mg-yttx-cn-s2 mycentos:v1 /bin/bash

 

相关文章:

  • 2021-06-25
  • 2021-09-16
  • 2021-08-19
  • 2022-12-23
  • 2022-12-23
  • 2022-02-20
  • 2022-12-23
猜你喜欢
  • 2021-09-25
  • 2021-07-06
  • 2021-12-05
  • 2021-11-11
  • 2022-12-23
  • 2021-10-30
相关资源
相似解决方案