Current Environment: CENTOS7
1. Refer to the Docker official documentation installation docker:https://docs.docker.com/engine/installation/linux/centos/
[[Email protected] ~]# Yum Update #更新yum源 [[email protected]~]# Tee/etc/yum.repos.d/docker.repo <<-'EOF'[Dockerrepo]name=Docker Repositorybaseurl=https://yum.dockerproject.org/repo/main/centos/7/Enabled=1Gpgcheck=1Gpgkey=https://YUM.DOCKERPROJECT.ORG/GPGeof# Add Yum source [[email protected]~]# Yum Install docker-engine #安装docker [[email protected]~]# systemctl Enable Docker.service #设置docker服务开机自动启动 [[email protected]~]# Systemctl start Docker #启动docker
#以上内容摘抄自docker官方文档
To view the current version after the installation is complete:
[[email protected] ~]# Docker version
Docker installation Complete
2. Set up users and groups for Docker
[Email protected] ~]# Useradd-G Docker Docker ~]# Usermod-ag Docker Docker #将docker用户添加到docker用户组
3. Set up Docker boot boot
[Email protected] ~]# Systemctl enable Docker.service
Ps:
~~ ~~]# systemctl status Docker
Installing the deployment Docker environment