Skip to content

Commit

Permalink
Fix systemd unit for Docker, waits for network to be online before st…
Browse files Browse the repository at this point in the history
…arting.

Avoids getting docker0 ip address through vmtools when booting.
  • Loading branch information
frapposelli authored and Touseef Liaqat committed Jun 11, 2015
1 parent 2689a7f commit 42b36ac
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions SPECS/docker/docker.spec
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,18 @@ install -vd %{buildroot}/lib/systemd/system
cat > %{buildroot}/lib/systemd/system/docker.service <<- "EOF"
[Unit]
Description=Docker Daemon
Wants=network-online.target
After=network-online.target

[Service]
ExecStart=/bin/docker -d -s overlay
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=always
MountFlags=slave
LimitNOFILE=1048576
LimitNPROC=1048576
LimitCORE=infinity

[Install]
WantedBy=multi-user.target
Expand Down

0 comments on commit 42b36ac

Please sign in to comment.