Skip to content

Instantly share code, notes, and snippets.

@SaltwaterC
Created July 28, 2017 17:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SaltwaterC/dd929f4ddb3bbc9089168b24068a06f0 to your computer and use it in GitHub Desktop.
Save SaltwaterC/dd929f4ddb3bbc9089168b24068a06f0 to your computer and use it in GitHub Desktop.
Broken docker_service of docker cookbook

Taken from:

  • /etc/systemd/system/docker.socket
  • /etc/systemd/system/docker.service

On CentOS 7.3 with docker cookbook 2.15.18.

[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
After=network-online.target docker.socket firewalld.service
Wants=network-online.target
Requires=docker.socket
[Service]
Type=notify
ExecStartPre=/sbin/sysctl -w net.ipv4.ip_forward=1
ExecStartPre=/sbin/sysctl -w net.ipv6.conf.all.forwarding=1
ExecStart=/usr/bin/dockerd --bip=172.17.42.1/16 --group=docker -H tcp://0.0.0.0:2375 --pidfile=/var/run/docker.pid --storage-driver=devicemapper
ExecStartPost=/usr/libexec/docker/docker-wait-ready
ExecReload=/bin/kill -s HUP $MAINPID
LimitNOFILE=1048576
LimitNPROC=infinity
LimitCORE=infinity
TasksMax=infinity
TimeoutStartSec=0
Delegate=yes
KillMode=process
Restart=always
StartLimitBurst=3
StartLimitInterval=60s
[Install]
WantedBy=multi-user.target
[Unit]
Description=Docker Socket for the API
PartOf=docker.service
[Socket]
ListenStream=tcp://0.0.0.0:2375
SocketMode=0660
SocketUser=root
SocketGroup=docker
[Install]
WantedBy=sockets.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment