docker 配置文件:/etc/docker/daemon.json
/etc/docker/daemon.json 是 docker 的配置文件,默认是没有的,需要我们手动创建,可配置项如下:
[root@localhost ~]$ vim /etc/docker/daemon.json
{
"authorization-plugins": [],
"data-root": "", # 设置docker运行时的根目录
"dns": [], # 设置容器的DNS地址
"dns-opts": [], # 设置容器的/etc/resolv.conf文件
"dns-search": [],
"exec-opts": [],
"exec-root": "",
"experimental": false,
"features": {},
"storage-driver": "",
"storage-opts": [],
"labels": [],
"live-restore": true,
"log-driver": "json-file",
"log-opts": {
"max-size": "10m",
"max-files":"",
"labels": "somelabel",
"env": "os,customer"
},
"mtu": 0,
"pidfile": "", # 设置docker守护进程的PID文件
"cluster-store": "",
"cluster-store-opts": {},
"cluster-advertise": "",
"max-concurrent-downloads": 3,
"max-concurrent-uploads": 5,
"default-shm-size": "64M",
"shutdown-timeout": 15,
"debug": true, # 是否以debug模式启动docker
"hosts": [], # 设置容器的hosts
"log-level": "",
"tls": true,
"tlsverify": true,
"tlscacert": "",
"tlscert": "",
"tlskey": "",
"swarm-default-advertise-addr": "",
"api-cors-header": "",
"selinux-enabled": false, # 设置是否支持SELinux
"userns-remap": "",
"group": "",
"cgroup-parent": "",
"default-ulimits": {
"nofile": {
"Name": "nofile",
"Hard": 64000,
"Soft": 64000
}
},
"init": false,
"init-path": "/usr/libexec/docker-init",
"ipv6": false,
"iptables": false,
"ip-forward": false,
"ip-masq": false,
"userland-proxy": false,
"userland-proxy-path": "/usr/libexec/docker-proxy",
"ip": "0.0.0.0",
"bridge": "",
"bip": "",
"fixed-cidr": "",
"fixed-cidr-v6": "",
"default-gateway": "",
"default-gateway-v6": "",
"icc": false,
"raw-logs": false,
"allow-nondistributable-artifacts": [],
"registry-mirrors": [], # 设置镜像加速地址
"seccomp-profile": "",
"insecure-registries": [], # 设置docker的私有仓库地址
"no-new-privileges": false,
"default-runtime": "runc",
"oom-score-adjust": -500,
"node-generic-resources": ["NVIDIA-GPU=UUID1", "NVIDIA-GPU=UUID2"],
"runtimes": {
"cc-runtime": {
"path": "/usr/bin/cc-runtime"
},
"custom": {
"path": "/usr/local/bin/my-runc-replacement",
"runtimeArgs": [
"--debug"
]
}
},
"default-address-pools":[{"base":"172.80.0.0/16","size":24},
{"base":"172.90.0.0/16","size":24}]
}
docker 配置文件:/etc/docker/daemon.json的更多相关文章
- docker: Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled (Client.Timeout exceeded while awaiting headers).
docker: Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled ...
- docker: Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled
故障描述: [root@docker01 ~]# docker run centos docker: Error response from daemon: Get https://registry- ...
- Windows安装Docker & Docker-Compose & 配置docker私有仓库
一定要给windows先创建软连接,不然系统盘会爆表的: mklink /j .docker D:\Administrator\.docker Win7安装Docker Dockerfile # FR ...
- [转帖]Docker的daemon.json的作用
Docker(十六)-Docker的daemon.json的作用 https://www.cnblogs.com/zhuochong/p/10070434.html jfrog 培训的时候 说过这个地 ...
- Docker(十六)-Docker的daemon.json的作用
docker安装后默认没有daemon.json这个配置文件,需要进行手动创建.配置文件的默认路径:/etc/docker/daemon.json 一般情况,配置文件 daemon.json中配置的项 ...
- Docker修改daemon.json后无法启动的问题
本文的运行环境为Centos 7.3,Docker与Kubernetes的安装方式见kubeadm安装kubernetes V1.11.1 集群 最近在整理Docker和Kubernetes中的日志与 ...
- 修改 Docker 的 daemon.json后启动失败
创建Harbor要把register 换成Harbor地址 vim /etc/docker/daemon.json添加{ "insecure-registries":[" ...
- docker daemon文件/etc/docker/daemon.json配置
On Linux The default location of the configuration file on Linux is /etc/docker/daemon.json. The --c ...
- docker daemon.json 配置
下面是自己设置的 /etc/docker/daemon.json 文件中的配置案例 [root@master docker]# cat daemon.json { "registry-mir ...
随机推荐
- 被linux线程基础折磨的点滴——还是没得到完美的答案,但至少得到了所需
#include<sys/types.h> #include<unistd.h> #include<stdio.h> #include<stdlib.h> ...
- 面试-SizeOf一个对象会得到什么?
相关资料: 1.https://zhidao.baidu.com/question/283124338.html unit Unit1; interface uses Windows, Message ...
- 【Unity】关于发射子弹、导弹追踪的逻辑
做个笔记,之后补上. 一.发射子弹 网上搜到的基本是两种方法: 给子弹物体添加一个力 AddForce. 子弹物体挂一个运动脚本,Update中毎帧向前运动.通过调整子弹生成点的Transform来控 ...
- 设计模式-观察者模式(下)<转>
观察者模式在Java中有两种实现方式,上文是一种方式,这种方式是自己写代码实现. 另一种方式是使用Java内置的观察者模式来实现. 相关的接口和类如下: java.util.Observable ...
- C10K并发连接_转
转载:http://blog.csdn.net/wangtaomtk/article/details/51811011 1 C10K问题 大家都知道互联网的基础就是网络通信,早期的互联网可以说是一个小 ...
- 关于Cocos2d-x随机数的生成
1.使用前必须下一个随机种子,可以让每一次生成的随机数是不一样的,这里的每一次指的是时间上的每一次,如果是同一时间的随机数就不能这样写了 srand((unsigned)time(NULL));--- ...
- (转)PS流格式
概念: 将具有共同时间基准的一个或多个PES组合(复合)而成的单一的数据流称为节目流(Program Stream). ES是直接从编码器出来的数据流,可以是编码过的视频数据流,音频数据流,或其他编码 ...
- (转)YUV420存储格式
YUV格式有两大类:planar和packed.对于planar的YUV格式,先连续存储所有像素点的Y,紧接着存储所有像素点的U,随后是所有像素点的V.对于packed的YUV格式,每个像素点的Y,U ...
- 鼠标捕获(setCapture,releaseCapture)的学习
鼠标捕获(setCapture)作用是将鼠标事件捕获到当前文档的指定的对象——对指定的对象设置鼠标捕获.这个对象会为当前应用程序或整个系统接收所有鼠标事件. 所谓鼠标捕获,是指对鼠标事件(onmous ...
- MySQL无法远程连接解决方案
1.查看/etc/mysql/my.cnf配置文件是否只允许本地连接 注释配置:#bind-address = 127.0.0.1,重启MySQL Server 2.防火墙(我用的是iptables) ...