Centos 7上安装docker及设置自启动

本文详细介绍了在CentOS系统中安装Docker Engine的完整过程。首先,通过yum-utils包安装yum-config-manager工具并设置Docker的稳定仓库。接着,使用yum命令安装最新版的Docker Engine和containerd。然后,启动Docker服务,并验证安装是否成功。最后,设置Docker开机启动,确保系统重启后Docker能够自动运行。
摘要由CSDN通过智能技术生成
  1. Install the yum-utils package (which provides the yum-config-manager utility) and set up the stable repository.
 sudo yum install -y yum-utils
 sudo yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo
  1. Install the latest version of Docker Engine and containerd, or go to the next step to install a specific version:
 sudo yum install docker-ce docker-ce-cli containerd.io
  1. Start Docker.
 sudo systemctl start docker
  1. Verify that Docker Engine is installed correctly by running the hello-world image.
 sudo docker run hello-world
  1. Setting docker self-start
sudo systemctl enable docker
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值