docker daemon(dockerd) 配置文件 daemon.json
新博客地址:https://blog.iaiot.com/docker-daemon.html
原文:https://docs.docker.com/engine/reference/commandline/dockerd/
Usage: dockerd COMMANDA self-sufficient runtime for containers.Options:--add-runtime runtime Register an additional OCI compatible runtime (default [])--allow-nondistributable-artifacts list Push nondistributable artifacts to specified registries (default [])--api-cors-header string Set CORS headers in the Engine API--authorization-plugin list Authorization plugins to load (default [])--bip string Specify network bridge IP-b, --bridge string Attach containers to a network bridge--cgroup-parent string Set parent cgroup for all containers--cluster-advertise string Address or interface name to advertise--cluster-store string URL of the distributed storage backend--cluster-store-opt map Set cluster store options (default map[])--config-file string Daemon configuration file (default "/etc/docker/daemon.json")--containerd string Path to containerd socket--cpu-rt-period int Limit the CPU real-time period in microseconds--cpu-rt-runtime int Limit the CPU real-time runtime in microseconds--data-root string Root directory of persistent Docker state (default "/var/lib/docker")-D, --debug Enable debug mode--default-gateway ip Container default gateway IPv4 address--default-gateway-v6 ip Container default gateway IPv6 address--default-address-pool Set the default address pool for local node networks--default-runtime string Default OCI runtime for containers (default "runc")--default-ulimit ulimit Default ulimits for containers (default [])--dns list DNS server to use (default [])--dns-opt list DNS options to use (default [])--dns-search list DNS search domains to use (default [])--exec-opt list Runtime execution options (default [])--exec-root string Root directory for execution state files (default "/var/run/docker")--experimental Enable experimental features--fixed-cidr string IPv4 subnet for fixed IPs--fixed-cidr-v6 string IPv6 subnet for fixed IPs-G, --group string Group for the unix socket (default "docker")--help Print usage-H, --host list Daemon socket(s) to connect to (default [])--icc Enable inter-container communication (default true)--init Run an init in the container to forward signals and reap processes--init-path string Path to the docker-init binary--insecure-registry list Enable insecure registry communication (default [])--ip ip Default IP when binding container ports (default 0.0.0.0)--ip-forward Enable net.ipv4.ip_forward (default true)--ip-masq Enable IP masquerading (default true)--iptables Enable addition of iptables rules (default true)--ipv6 Enable IPv6 networking--label list Set key=value labels to the daemon (default [])--live-restore Enable live restore of docker when containers are still running--log-driver string Default driver for container logs (default "json-file")-l, --log-level string Set the logging level ("debug", "info", "warn", "error", "fatal") (default "info")--log-opt map Default log driver options for containers (default map[])--max-concurrent-downloads int Set the max concurrent downloads for each pull (default 3)--max-concurrent-uploads int Set the max concurrent uploads for each push (default 5)--metrics-addr string Set default address and port to serve the metrics api on--mtu int Set the containers network MTU--node-generic-resources list Advertise user-defined resource--no-new-privileges Set no-new-privileges by default for new containers--oom-score-adjust int Set the oom_score_adj for the daemon (default -500)-p, --pidfile string Path to use for daemon PID file (default "/var/run/docker.pid")--raw-logs Full timestamps without ANSI coloring--registry-mirror list Preferred Docker registry mirror (default [])--seccomp-profile string Path to seccomp profile--selinux-enabled Enable selinux support--shutdown-timeout int Set the default shutdown timeout (default 15)-s, --storage-driver string Storage driver to use--storage-opt list Storage driver options (default [])--swarm-default-advertise-addr string Set default address or interface for swarm advertised address--tls Use TLS; implied by --tlsverify--tlscacert string Trust certs signed only by this CA (default "~/.docker/ca.pem")--tlscert string Path to TLS certificate file (default "~/.docker/cert.pem")--tlskey string Path to TLS key file (default ~/.docker/key.pem")--tlsverify Use TLS and verify the remote--userland-proxy Use userland proxy for loopback traffic (default true)--userland-proxy-path string Path to the userland proxy binary--userns-remap string User/Group setting for user namespaces-v, --version Print version information and quit
Linux 上配置文件的默认位置是 /etc/docker/daemon.json。 --config-file 可用于指定非默认位置。
这是 Linux 上允许的配置选项示例:
{"authorization-plugins": [],"data-root": "","dns": [],"dns-opts": [],"dns-search": [],"exec-opts": [],"exec-root": "","experimental": false,"features": {},"storage-driver": "","storage-opts": [],"labels": [],"live-restore": true,"log-driver": "","log-opts": {},"mtu": 0,"pidfile": "","cluster-store": "","cluster-store-opts": {},"cluster-advertise": "","max-concurrent-downloads": 3,"max-concurrent-uploads": 5,"default-shm-size": "64M","shutdown-timeout": 15,"debug": true,"hosts": [],"log-level": "","tls": true,"tlsverify": true,"tlscacert": "","tlscert": "","tlskey": "","swarm-default-advertise-addr": "","api-cors-header": "","selinux-enabled": false,"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": [],"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}]
}
修改后重新启动服务使之生效。
$ sudo systemctl daemon-reload
$ sudo systemctl restart docker
docker daemon(dockerd) 配置文件 daemon.json相关推荐
- Docker的配置文件 daemon.json 详解
配置文件的默认路径:/etc/docker/daemon.json 常用参数选项: { "registry-mirrors": ["http://harbor.test. ...
- docker: Error response from daemon: Unknown runtime specified nvidia. 解决方法
nvidia-docker 运行出错: 1 拉取镜像: docker pull XXX 2 开启镜像: nvidia-docker run -it -v `pwd`:/paddle XXX /bin/ ...
- 创建docker容器时出现 docker: Error response from daemon, The container name is already in use by container
问题: 服务器关机后,重新启动,然后启动docker container的时候,出现报错"docker: Error response from daemon, The container ...
- Debug docker: docker: Error response from daemon: could not select device driver ““ with capabilitie
报错信息 docker: Error response from daemon: could not select device driver "" with capabiliti ...
- docker 网络 不好用 docker: Error response from daemon: failed to create endpoint jovial_wing on network b
启动容器时,有可能会遇到如下问题,比如启动redis容器: sudo docker run -d -p 6379:6379 --name redis redis:latest Linux代码 dock ...
- docker: Error response from daemon: driver failed programming external connectivity
docker: Error response from daemon: driver failed programming external connectivity 解决方案 (重新启动docker ...
- Unable to find image ‘XXX‘ locally docker: Error response from daemon: pull access denied for
error message Unable to find image 'redis.conf-v:latest' locally docker: Error response from daemon: ...
- docker: Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: TLS handshake ti
docker: Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: TLS handshake ti ...
- docker:报错docker: Error response from daemon: Mounts denied:
运行 docker run --name zymongo -v /data/db:/mymongo/db -p 27017:27017 -d mongo:4.0 的时候报错如图: docker: Er ...
- docker: Error response from daemon: driver failed programming external connectivity on endpoint
错误现象 => 启动 rancher server 时出现网络故障,如下: docker: Error response from daemon: driver failed programmi ...
最新文章
- oracle中的连接字符串
- Centos5.5下安装LAMP完整版
- SQL基础【十八、事物】(sql事物慎用,还是写业务逻辑代码好一些,入伙涉及到更换数据啥的很麻烦!)
- python2.7出现IOError: [Errno 5] Input/output error
- 2.数据结构笔记学习--线性表基本操作
- 使用Jenkins,GitHub和Docker的最先进的持续集成和部署管道
- (转)MOMO的Unity3D研究院之深入理解Unity脚本的执行顺序(六十二)
- Android 代码实现查看SQLite数据库中的表
- B端产品经理,应从哪些方面理解业务?
- 题解第八届蓝桥杯B.等差素数列
- numpy.arccos详解
- 大学四年的总结与感受
- R语言wmf矢量图片导出大片空白及搜索网站
- [BZOJ4466][Jsoi2013]超立方体
- 文末送书 | 手把手教你玩转,Python 会交互的超强绘图库 Plotly!
- linux 设备树 otg,linux下充电IC OTG设备供电控制
- 全国计算机二级office选择题知识点,全国计算机二级考试MS office选择题知识点合集(通用)...
- 【TDA2x学习】番外篇一、TDA2x工程学习手记
- TikTok带货爆单:彩色人造玫瑰周增长率飙升,TikTok热卖榜前10?
- 石英晶体(Crystal)振荡电路