centos7下安装docker

来源:https://www.cnblogs.com/qtzd/p/14679120.html

Docker安装
CentOS 7
使用Xshell连接远程进行服务器操作

环境查看

系统内核是 3.10 以上的

[root@localhost ~]# uname -r
3.10.0-229.el7.x86_64

系统版本

[root@localhost ~]# cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

安装
帮助文档:https://docs.docker.com/engine/install/centos/

1、卸载旧的版本

yum remove docker
docker-client
docker-client-latest
docker-common
docker-latest
docker-latest-logrotate
docker-logrotate
docker-engine

2、需要的安装包

yum install -y yum-utils

3、设置镜像的仓库

yum-config-manager
--add-repo
https://download.docker.com/linux/centos/docker-ce.repo #默认是从国外的

yum-config-manager
--add-repo
http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo #推荐使用阿里云的

更新yum软件包索引

yum makecache fast

4、安装docker相关的 docker-ce 社区 ee 企业版

yum install docker-ce docker-ce-cli containerd.io

5、启动docker

systemctl start docker

6、使用doeker version 测试是否安装成功

doeker version

posted @   树树先生  阅读(47)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
点击右上角即可分享
微信分享提示