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 ...
随机推荐
- python 将txt内容写入excel
#!/usr/bin/env python # -*- coding: utf-8 -* import os import xlrd import xlwt import datetime impor ...
- eclipse egit 报错 The current branch is not configured for pull No value for key branch.master
eclipse egit 插件 pull报错 The current branch is not configured for pull No value for key branch.master ...
- JAVA-JSP声明语句
相关资料: <21天学通Java Web开发> 结果总结: 1.<%! %>声明的变量为全局变量. 实例代码: <html> <head> <ti ...
- 基于jQuery/CSS3实现拼图效果的相册插件
今天我们要来分享一款很酷的jQuery相册插件,首先相册中的图片会以一定的角度倾斜放置在页面上,点击图片缩略图就可以展开图片,并且图片是由所有缩略图拼接而成,图片展开和收拢的动画效果也非常不错.当然图 ...
- JS地毯式学习四
1 窗口的位置 用来确定和修改 window 对象位置的属性和方法有很多. IE . Safari . Opera 和 Chrome都提供了 screenLeft 和 screenTop 属性,分别 ...
- mybatis中如果存在参数不再实体中的是如何处理
<select id="queryMapByType" parameterType="int" resultType="my.geomap.VO ...
- Curved UI - VR Ready Solution To Bend Warp Your Canvas 1.7,1.8,2.2,2.3 四种版本压缩包(Unity UGUI曲面插件),可以兼容VRTK
Curved UI - VR Ready Solution To Bend Warp Your Canvas 1.7,1.8,2.2,2.3 四种版本压缩包(Unity UGUI曲面插件) 可以兼容V ...
- 【Unity/Kinect】获取预制的手势信息KinectInterop.HandState
Kinect使用了枚举KinectInterop.HandState来描述手势. 该手势指的是手掌的状态(张开/握拳),而不是说整个手臂的肢体动作(Gesture). 同样是需要嵌套在Kinect获取 ...
- 配置Apache与PHP的环境
http://www.cnblogs.com/zhcncn/archive/2013/05/09/3068318.html 1. 下载 Apache版本号为2.2.22. 最好下载msi安装文件.下载 ...
- Android——列表视图 ListView(二)SimpleAdapter
SimpleAdapter:可显示文字加图片 activity_activitysimple.xml <?xml version="1.0" encoding="u ...