Docker Community Forums

Share and learn in the Docker community.

Dockerd and daemon.json issue


(Fred Wang) #1

Hi, guys,

I find a problem maybe you can help. My env is as below
Server Version: 17.05.0-ce
Storage Driver: overlay2
Backing Filesystem: xfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 9048e5e50717ea4497b757314bad98ea3763c145
runc version: 9c2d8d184e5da67c95d601382adf14862e4f2228
init version: 949e6fa
Security Options:
seccomp
Profile: default
Kernel Version: 4.12.7-1.el7.elrepo.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 7.776GiB
Name: efcnsvts001
ID: PSTF:XOB2:RSWE:4L3F:AONQ:E2XT:L4DZ:YL3X:CGBZ:S7LW:O7RD:7VIQ
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Username: 645939756
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
127.0.0.0/8

Problem:
I cannot use /etc/docker/daemon.json as my start daemon for docker service. The service will fail and exit.
I also cannot use dockerd to configure service. The process will get no response.
I can only modify /usr/lib/systemd/system/docker.service to configure service successfully. is that normal?


(Recotone) #2

yes, i got the same issue
i had sloved the issue like this :

1、vim /lib/systemd/system/docker.service
2、add ExecStart=/usr/bin/dockerd --insecure-registry YOUR_URL
3、systemctl daemon-reload && systemctl restart docker

this is my docker info:

Containers: 55
Running: 27
Paused: 0
Stopped: 28
Images: 30
Server Version: 17.09.0-ce
Storage Driver: overlay
Backing Filesystem: xfs
Supports d_type: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 06b9cb35161009dcb7123345749fef02f7cea8e0
runc version: 3f2f8b84a77f73d38244dd690525642a72156c64
init version: 949e6fa
Security Options:
seccomp
Profile: default
Kernel Version: 3.10.0-693.2.2.el7.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 3.694GiB
Name: k8s-node-2
ID: QHE6:INHR:PD6S:AKHC:JGKU:4M2G:KVAM:WGRS:5ENH:G3B3:XJGT:TAMR
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Username: recotone
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
harbor.recotone.com
127.0.0.0/8
Registry Mirrors:
Live Restore Enabled: false