Docker install in Linux
install command
sudo yum install -y yum-utils device-mapper-persistent-data lvm2 sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo sudo yum install docker-ce docker-ce-cli containerd.io sudo systemctl start docker
docker-compose command
sudo curl -L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose sudo chmod +x /usr/local/bin/docker-compose
启动
systemctl start docker
设置开机启动
systemctl enable docker
问题记录
1.安装出现No more mirrors to try.
解决方案:
cd /etc/yum.repos.d/
ls
查看相关docker的文件删掉,重新在安装。
ps:https://docs.docker.com/install/linux/docker-ce/centos/
此随笔乃本人学习记录,如有疑问欢迎在下面评论,转载请标明出处。
如果对您有帮助请动动鼠标右下方给我来个赞,您的支持是我最大的动力。