docker环境部署

GodrevyLighthouse_ZH-CN10749942094_1920x1080.jpg

docker-composer 安装

https://github.com/docker/compose/releases

Docker 安装

方法1

1、确保 yum 包更新到最新。

sudo yum update

2、执行 Docker 安装脚本。

curl -sSL https://get.docker.com/ | sh

3、启动 Docker 进程。

sudo systemctl start docker

4、验证 docker 是否安装成功并在容器中执行一个测试的镜像。

sudo docker run hello-world

docker ps

方法2

1、更新yum源头

yum update

2、生成docker.repo

tee /etc/yum.repos.d/docker.repo <<-'EOF'
[dockerrepo]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/$releasever/
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg
EOF

3、安装docker

yum install docker-engine

[官方文档] https://docs.docker.com/install/linux/docker-ce/centos/#upgrade-docker-ce

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。