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