make docker run directly under systemd without forking

Docker seems to be working fine now under systemd. Some recent code
changes have fixed the problems we were running into before.

What has been tested while running docker directly under systemd:
1. docker run
2. docker pull
3. docker images
4. docker rm
This commit is contained in:
unclejack 2013-06-27 17:07:18 +03:00
parent 8d82de1789
commit cc0bc03984

View File

@ -1,15 +1,15 @@
[Service]
Type=forking
Type=simple
ExecStartPre=/bin/mount --make-rprivate /
# Enable forwarding to allow NAT to work
# TODO: Move this to sysctl.conf
ExecStartPre=/sbin/sysctl -w net.ipv4.ip_forward=1
# HACK: for some reason docker is crashing when exiting a container when being
# supervised by systemd. Fork out for now. Real solution should be:
# ExecStart=/usr/bin/docker -d -D
# Try to use this alternate way of starting docker if docker crashes for you:
# ExecStart=/bin/bash -c "/usr/bin/nohup /usr/bin/docker -d -D &"
# You also need to update Type above to: Type=forking
ExecStart=/bin/bash -c "/usr/bin/nohup /usr/bin/docker -d -D &"
ExecStart=/usr/bin/docker -d -D
[Install]
WantedBy=multi-user.target