From 09b4f916333d009c3b5999c8673eb88b38e95730 Mon Sep 17 00:00:00 2001 From: Brandon Philips Date: Sat, 7 Dec 2013 21:52:15 -0800 Subject: [PATCH] feat(app-emulation/docker): use the coreos unit file On CoreOS we use systemd to manage docker containers. Having docker automatically start containers on reboot makes everything confused. Stop doing this. --- .../app-emulation/docker/docker-0.7.1.ebuild | 2 +- .../app-emulation/docker/files/docker.service | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 sdk_container/src/third_party/coreos-overlay/app-emulation/docker/files/docker.service diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/docker/docker-0.7.1.ebuild b/sdk_container/src/third_party/coreos-overlay/app-emulation/docker/docker-0.7.1.ebuild index 29532ca0fa..8a0797dd55 100644 --- a/sdk_container/src/third_party/coreos-overlay/app-emulation/docker/docker-0.7.1.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/docker/docker-0.7.1.ebuild @@ -119,7 +119,7 @@ src_install() { newinitd contrib/init/openrc/docker.initd docker newconfd contrib/init/openrc/docker.confd docker - systemd_dounit contrib/init/systemd/docker.service + systemd_dounit "${FILESDIR}/docker.service" dodoc AUTHORS CONTRIBUTING.md CHANGELOG.md NOTICE README.md if use doc; then 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 new file mode 100644 index 0000000000..6e2067a17f --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/docker/files/docker.service @@ -0,0 +1,13 @@ +[Unit] +Description=Docker Application Container Engine +Documentation=http://docs.docker.io +After=network.target + +[Service] +ExecStartPre=/bin/mount --make-rprivate / +# Run docker but don't have docker automatically restart +# containers. This is a job for systemd and unit files. +ExecStart=/usr/bin/docker -d -r=false + +[Install] +WantedBy=multi-user.target