安装依赖

yum install -y yum-utils device-mapper-persistent-data lvm2

更换阿里云源

yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

Docker安装

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

如果出现:

Package containerd.io-1.2.0-3.el7.x86_64 is already installed.
Error: Problem: package docker-ce-3:19.03.13-3.el7.x86_64 requires containerd.io >= 1.2.2-3, but none of the providers can be installed- cannot install the best candidate for the job- package containerd.io-1.2.10-3.2.el7.x86_64 is filtered out by modular filtering- package containerd.io-1.2.13-3.1.el7.x86_64 is filtered out by modular filtering- package containerd.io-1.2.13-3.2.el7.x86_64 is filtered out by modular filtering- package containerd.io-1.2.2-3.3.el7.x86_64 is filtered out by modular filtering- package containerd.io-1.2.2-3.el7.x86_64 is filtered out by modular filtering- package containerd.io-1.2.4-3.1.el7.x86_64 is filtered out by modular filtering- package containerd.io-1.2.5-3.1.el7.x86_64 is filtered out by modular filtering- package containerd.io-1.2.6-3.3.el7.x86_64 is filtered out by modular filtering- package containerd.io-1.3.7-3.1.el7.x86_64 is filtered out by modular filtering
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

那么执行下面指令更新依赖即可:

yum install -y https://download.docker.com/linux/fedora/30/x86_64/stable/Packages/containerd.io-1.2.6-3.3.fc30.x86_64.rpm

启动并验证Docker

  • 启动docker
systemctl start docker
  • 运行HelloWorld
docker run hello-world

看到以下内容就等于安装成功了:

Hello from Docker!
This message shows that your installation appears to be working correctly.To generate this message, Docker took the following steps:1. The Docker client contacted the Docker daemon.2. The Docker daemon pulled the "hello-world" image from the Docker Hub.(amd64)3. The Docker daemon created a new container from that image which runs theexecutable that produces the output you are currently reading.4. The Docker daemon streamed that output to the Docker client, which sent itto your terminal.To try something more ambitious, you can run an Ubuntu container with:$ docker run -it ubuntu bashShare images, automate workflows, and more with a free Docker ID:https://hub.docker.com/For more examples and ideas, visit:https://docs.docker.com/get-started/

使用阿里云Docker仓库

进入阿里云容器镜像服务:
https://cr.console.aliyun.com/cn-beijing/instances/mirrors

  • 配置镜像加速器
    针对Docker客户端版本大于 1.10.0 的用户
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{"registry-mirrors": ["https://xxxxxxxx.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker

xxxxxx位置替换为自己阿里云镜像地址即可。

  • 设置服务自启动
systemctl enable docker.service

安装Docker-compose

下载Docker-compose

curl -L "https://github.com/docker/compose/releases/download/1.25.5/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

文件路径赋权限

chmod +x /usr/local/bin/docker-compose

命令

ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose

查看docker-compose版本,能查到说明安装成功

docker-compose --version

【Docker】安装Docker以及配置阿里云Docker镜像仓库相关推荐

  1. Linux配置阿里云CentOS镜像仓库及Epel镜像仓库

    文章目录 一.配置CentOS镜像仓库 1.备份 2.安装 wget自动下载工具 3.下载新的CentOS-Base.repo到 /etc/yum.repos.d/ 4.深入了解 二.配置Epel镜像 ...

  2. Unraid配置阿里云加速镜像安装荒野无灯qBittorrent镜像

    文章来源: http://bt123.byethost15.com/index.php/archives/364/ http://av98.byethost10.com 一.Unraid配置阿里云加速 ...

  3. Unraid配置阿里云加速镜像安装荒野无灯qBittorrent镜像-原创

    文章来源: http://bt123.byethost15.com/index.php/archives/364/ http://av98.byethost10.com 一.Unraid配置阿里云加速 ...

  4. Mac IDEA配置阿里云国内镜像

    Mac IDEA配置阿里云国内镜像 1. 下载maven 2. 打开IDEA配置Maven 3. 编辑镜像地址 4. 重启IDEA IDEA会自动装配IDEA版本的maven,所以只需要配置setti ...

  5. 利用阿里云免费镜像仓库,实现微服务的k8s部署

    今天的内容给大家介绍下如何利用阿里云提供的免费私人容器镜像服务,来实现对个人项目容器镜像的管理,以及通过k8s集群来发布阿里云私人容器镜像服务中管理的服务.本文适合个人及创业团队学习/使用基于容器.镜 ...

  6. 阿里云个人镜像仓库日常基本使用

    阿里云个人镜像仓库日常基本使用 一.登录阿里云容器镜像管理服务 二.进入个人实例 三.创建镜像仓库 四.将本地镜像推送到阿里云镜像仓库 1.登录阿里云镜像仓库 2.将本地镜像重打标签 3.推送镜像到阿 ...

  7. 配置阿里云docker加速与云镜像配置

    文章目录 配置阿里docker加速 配置阿里docker云镜像 Reference 配置阿里docker加速 访问网页https://cr.console.aliyun.com/cn-beijing/ ...

  8. qduoj~前端~二次开发~打包docker镜像并上传到阿里云容器镜像仓库

    2019独角兽企业重金招聘Python工程师标准>>> 上一篇文章https://my.oschina.net/finchxu/blog/1930017记录了怎么在本地修改前端,现在 ...

  9. centos8.0 安装 podman 与配置阿里云加速

    前言 podman与docker命令大部分相同,安装比docker简单. 第一步: 执行以下四个命令中的一个,效果都一样. yum install -y docker(dnf install -y d ...

最新文章

  1. 流氓网站5599.net修改ie主页分析
  2. java修改文件的大小限制_Struts2修改上传文件大小限制方法解析
  3. (24)2-9-9-12分页(上)
  4. nyoj13-Fibonacci数
  5. sqlite3 select查询一列_一眼就会的sqlite3数据库
  6. as3 与 java_每天学一点Flash(48) As3.0 与 java 通信(1)
  7. python列表解析,生成表达式(一分钟读懂)
  8. 一起来读you don't know javascript(一)
  9. 用C语言实现C++中类的封装继承多态
  10. quartus 14.1破解失败解决方案
  11. php mysql 表情录入_php + mysql 存入表情 【如何转义emoji表情,让它可以存入utf8的数据库】...
  12. 【转载】C语言嵌入式系统编程修炼之二:软件架构篇
  13. wps表格宏被禁用如何解禁_wps的excel中宏被禁用怎么办 - 卡饭网
  14. 突发!Google 最大数据中心发生爆炸,三名技术人员受伤
  15. LeetCode C++基础面试题汇总附答案(一)
  16. 手把手教你静态代码检查工具TscanCode安装与使用
  17. kestrel web服务器性能对比,Asp.Net Core 3.0 Kestrel服务器下 高性能 WebSocket Server
  18. Tushare介绍、安装及快速入门
  19. 数据分析(六)之pandas学习【Series创建、切片、索引和读取外部数据】
  20. 主流商业智能(BI)工具的比较(三):Qlik与Domo

热门文章

  1. python热力图代码_python绘制热力图heatmap
  2. 软件工程技术--第五章 详细设计
  3. QT+OpenCV实现一个标注工具(图像处理、边缘检测)
  4. 【自撰】zooKeeper常用命令和权限
  5. 你的苹果手机耗电很严重?试着关掉这几个设置,一天一充很简单
  6. 区块链项目的三大模式详解
  7. openvas介绍及部署安装 - 官方
  8. win10 RTX2070s NVIDIA显卡驱动安装
  9. 探寻次时代渲染 - CryEngine2
  10. 实验吧登陆一下好吗??WP