From 163576a5ef3e2758b7f781c65637e079b0a03f49 Mon Sep 17 00:00:00 2001 From: Brandon Philips Date: Sun, 7 Apr 2013 16:03:06 -0700 Subject: [PATCH] hack(app-emulation/docker): fix exit under systemd 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 -b lxcbr0 --- .../app-emulation/docker/files/docker.service | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/docker/files/docker.service b/sdk_container/src/third_party/coreos-overlay/app-emulation/docker/files/docker.service index cda3d58dfb..843bce1e0b 100644 --- a/sdk_container/src/third_party/coreos-overlay/app-emulation/docker/files/docker.service +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/docker/files/docker.service @@ -2,7 +2,13 @@ ExecStartPre=/bin/mount --make-rprivate / ExecStartPre=/sbin/brctl addbr lxcbr0 ExecStartPre=/bin/ifconfig lxcbr0 10.65.41.1 -ExecStart=/usr/bin/docker -d -D -b lxcbr0 + +# 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 -b lxcbr0 + +ExecStart=/bin/bash -c "/usr/bin/nohup /usr/bin/docker -d -D -b lxcbr0 &" + ExecStopPost=/bin/ifconfig lxcbr0 down ExecStopPost=/sbin/brctl delbr lxcbr0