Linux中修改docker镜像源及安装docker
1、首先备份系统自带yum源配置文件/etc/yum.repos.d/CentOS-Base.repo
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
2、进入yum源配置文件所在的文件夹
cd /etc/yum.repos.d/
3、下载163的yum源配置文件(CentOS7)
wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
清华大学镜像源地址:https://mirrors.tuna.tsinghua.edu.cn/
4、清理缓存
yum clean all
5、测试下载安装
yum install gcc
6、安装docker
yum install docker
7、启动
systemctl start docker
8、启动报错
[root@localhost yum.repos.d]# systemctl start docker
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
[root@localhost yum.repos.d]# systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed -- :: UTC; 28s ago
Docs: http://docs.docker.com
Process: ExecStart=/usr/bin/dockerd-current --add-runtime docker-runc=/usr/libexec/docker/docker-runc-current --default-runtime=docker-runc --exec-opt native.cgroupdriver=systemd --userland-proxy-path=/usr/libexec/docker/docker-proxy-current --init-path=/usr/libexec/docker/docker-init-current --seccomp-profile=/etc/docker/seccomp.json $OPTIONS $DOCKER_STORAGE_OPTIONS $DOCKER_NETWORK_OPTIONS $ADD_REGISTRY $BLOCK_REGISTRY $INSECURE_REGISTRY $REGISTRIES (code=exited, status=/FAILURE)
Main PID: (code=exited, status=/FAILURE) Dec :: localhost.localdomain systemd[]: Starting Docker Application Container Engine...
Dec :: localhost.localdomain dockerd-current[]: time="2018-12-12T07:27:22.024162402Z" level=warning msg="could not change group /var/run/docker...t found"
Dec :: localhost.localdomain dockerd-current[]: time="2018-12-12T07:27:22.038636556Z" level=info msg="libcontainerd: new containerd process, pid: 4170"
Dec :: localhost.localdomain dockerd-current[]: Error starting daemon: SELinux is not supported with the overlay2 graph driver on this kernel. ...d=false)
Dec :: localhost.localdomain systemd[]: docker.service: main process exited, code=exited, status=/FAILURE
Dec :: localhost.localdomain systemd[]: Failed to start Docker Application Container Engine.
Dec :: localhost.localdomain systemd[]: Unit docker.service entered failed state.
Dec :: localhost.localdomain systemd[]: docker.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
根据提示查看一下详情,执行:journalctl -xe
Dec :: localhost.localdomain dockerd[]: time="2018-12-13T06:42:24.350020859Z" level=info msg="libcontainerd: new containerd process, pid: 2722"
Dec :: localhost.localdomain dockerd[]: time="2018-12-13T06:42:25.356303658Z" level=error msg="[graphdriver] prior storage driver overlay2 failed: driver
Dec :: localhost.localdomain dockerd[]: Error starting daemon: error initializing graphdriver: driver not supported
错误原因:error initializing graphdriver: driver not supported
解决办法:在 /etc/docker 目录下创建daemon.json文件,并且加入以下配置
touch daemon.json
vi daemon.json
{
"storage-driver": "overlay2",
"storage-opts": [
"overlay2.override_kernel_check=true"
]
}
再次启动
systemctl start docker
问题解决
9、又来一个问题
Error starting daemon: SELinux is not supported with the overlay2 graph driver on this kernel. Either boot
此linux的内核中的SELinux不支持 overlay2 graph driver ,解决方法有两个,要么启动一个新内核,要么就在docker里禁用selinux,–selinux-enabled=false
vi /etc/sysconfig/docker #设置
--selinux-enabled=false

Linux中修改docker镜像源及安装docker的更多相关文章
- [Linux] - Manjaro ARM 系统配置(更新镜像源,安装 Docker 和 Dotnet Core)
硬件:Raspberry Pi 4B系统:Manjaro-ARM-xfce-rpi4-19.08网址:https://manjaro.org/ Issue系统启动后,中文字符显示为小方格乱码 解决:安 ...
- CentOS7用阿里云Docker Yum源在线安装Docker 17.03.2
参考文档 安装步骤 删除已安装的Docker 配置阿里云Docker Yum源 安装指定版本 启动Docker服务 参考文档 官方Docker安装文档:https://docs.docker. ...
- CentOS7用阿里云Docker Yum源在线安装Docker
一.参考文档 官方Docker安装文档:https://docs.docker.com/install/linux/docker-ce/centos 阿里云Docker安装文档:https://yq. ...
- Windows、Linux(Ubuntu)修改 pip 镜像源
一.Windows 修改 pip 镜像源 1.win + R 打开运行,输入 %APPDATA% 2.按下回车,打开文件夹. 3.在该文件夹下,新建文件夹,命名 pip. 4.进入 pip 文件夹, ...
- windows及linux环境下永久修改pip镜像源的方法
一.在windows环境下修改pip镜像源的方法(以python3.5为例) (1):在windows文件管理器中,输入 %APPDATA% (2):会定位到一个新的目录下,在该目录下新建pip文件夹 ...
- kali换源及安装docker
kali换源及安装docker 以管理员身份运行. 换源,记得先备份, cp /etc/apt/sources.list /etc/apt/sources.list.bak 然后修改/etc/apt/ ...
- linux下MySQL 5.6源码安装
linux下MySQL 5.6源码安装 1.下载:当前mysql版本到了5.6.20 http://dev.mysql.com/downloads/mysql 选择Source Code 2.必要软件 ...
- 一、在windows环境下修改pip镜像源的方法(以python3为例)
在windows环境下修改pip镜像源的方法(以python3为例) 1.在windows文件管理器中,输入 %APPDATA% 2.会定位到一个新的目录下,在该目录下新建pip文件夹,然后到pip文 ...
- kali虚拟机安装VMTools、更新源、安装docker、配置sqli-labs
一.安装VMTools: 传送门:关于安装VMTools 跟其他版本的虚拟机安装VMTools没什么区别,也得连网(我是kali用dhcp开nat模式) 之后按照上面的链接根据博主的步骤一步一步来即可 ...
随机推荐
- GIL 线程/进程池 同步异步
GIL 什么是GIL 全局解释器锁,本质是一把互斥锁,是加在cpython解释器上的一把锁, 同一个进程内的所有线程需要先抢到GIL锁,才能执行python代码 为什么要有GIL cpython解释器 ...
- Linux磁盘与文件系统管理 之 认识EXT2系统
1 磁盘组成与分区 1.1 磁盘物理组成 (1)圆形盘片-记录数据 (2)机械手臂及磁头-读写盘片数据 (3)主轴马达-使得机械手臂成功读写数据驱动 1.2 盘片物理组成 (1)扇区-最小物理存储单位 ...
- 安装mongodb卡顿
"3.6下载安装会卡死."的原因在于,默认安装是包含mongodb compass,这个包的,这个包大约有180MB,下载很慢,导致所谓的的”卡死“. 如果你选用自定义安装的并且不 ...
- Mac VMware fusion nat 外网映射
当我们在使用VMware fusion NAT模式时,相当于形成了一个虚拟的局域网VLAN,这时虚拟机可以对外通信,但是nat对外隐藏了内网,外网访问虚拟机的时候就会遇到问题,比如ping ,ssh ...
- linux下防火墙iptables原理及使用
iptables简介 netfilter/iptables(简称为iptables)组成Linux平台下的包过滤防火墙,与大多数的Linux软件一样,这个包过滤防火墙是免费的,它可以代替昂贵的商业防火 ...
- 4C. Stars
4C. Stars Time Limit: 2000ms Case Time Limit: 2000ms Memory Limit: 65536KB 64-bit integer IO forma ...
- 贴一下我写过的c++程序代码
5258 #include <iostream>#include <iomanip>#include <cmath>using namespace std;clas ...
- asp.net提交危险字符处理方法之一
在form表单提交前,可以在web页面,submit按钮的click事件中,使用js函数对,可能有危险字符的内容进行编码. 有3个函数可用: encodeURI() 函数可把字符串作为 URI 进行编 ...
- 九度oj 题目1447:最短路
题目描述: 在每年的校赛里,所有进入决赛的同学都会获得一件很漂亮的t-shirt.但是每当我们的工作人员把上百件的衣服从商店运回到赛场的时候,却是非常累的!所以现在他们想要寻找最短的从商店到赛场的路线 ...
- shell的echo命令
echo是Shell的一个内部指令,用于在屏幕上打印出指定的字符串.命令格式: echo arg 您可以使用echo实现更复杂的输出格式控制. 显示转义字符 echo "\"It ...