centos 7 docker基础安装

  • 配置repo
sudo tee /etc/yum.repos.d/docker.repo <<-'EOF' [dockerrepo] name=Docker Repository baseurl=https://yum.dockerproject.org/repo/main/centos/7/ enabled=1 gpgcheck=1 gpgkey=https://yum.dockerproject.org/gpg [docker-main-repo] name=Docker main Repository baseurl=http://mirrors.aliyun.com/docker-engine/yum/repo/main/centos/7 enabled=1 gpgcheck=1 gpgkey=http://mirrors.aliyun.com/docker-engine/yum/gpg EOF
  • 安装软件
yum install docker-engine
systemctl enable docker.service
  • 启动服务
systemctl start docker
  • 测试
docker run --rm hello-world
相关文章
相关标签/搜索