首页 技术 正文
技术 2022年11月15日
0 收藏 685 点赞 2,549 浏览 1201 个字

环境准备

   1、需要有Linux的基础

   2、centOS 7

环境查看

# 系统内核是 3.10 以上的
[root@iz2zeaet7s13lfkc8r3e2kz ~]# uname -r
3.10.-1062.18..el7.x86_64
 
# 系统版本
[root@iz2zeaet7s13lfkc8r3e2kz ~]# 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/

# 如果有就先卸载旧版本
yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-engine# 需要的安装包
yum install -y yum-utils# 设置镜像仓库 默认是从国外的!
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

# 安装 docker-ce 社区版 ee企业版 官方推荐ce
yum install docker-ce docker-ce-cli containerd.io

# 启动
systemctl start docker

输入 docker version 查看版本信息

测试hello world

docker run hello-world
 

查看镜像 docker images

阿里云镜像加速

登录阿里云找到 容器镜像服务

分4步执行,执行完就ok了

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,493
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,907
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,740
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,495
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:8,133
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:5,297