From b6c9bd9b88e82550408b33f7a6362025e922b5c9 Mon Sep 17 00:00:00 2001 From: Justin Cormack Date: Wed, 10 Aug 2016 13:48:13 +0100 Subject: [PATCH] Create a systemd cgroups mountpoint This allows systemd based containers to "just work". Fixes https://github.com/docker/pinata/issues/3126 Signed-off-by: Justin Cormack --- alpine/packages/docker/etc/init.d/docker | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/alpine/packages/docker/etc/init.d/docker b/alpine/packages/docker/etc/init.d/docker index 55e3eb6d8..82ef229c2 100755 --- a/alpine/packages/docker/etc/init.d/docker +++ b/alpine/packages/docker/etc/init.d/docker @@ -13,6 +13,13 @@ start() pidfile="/run/docker.pid" + # create cgroups mount for systemd containers + if [ ! -d /sys/fs/cgroup/systemd ] + then + mkdir -p /sys/fs/cgroup/systemd + mount -t cgroup -o none,name=systemd cgroup /sys/fs/cgroup/systemd + fi + # Only start with networking on cloud editions DOCKER_OPTS="${DOCKER_OPTS} -H unix:///var/run/docker.sock" if [ "$(mobyplatform)" = "aws" ] || [ "$(mobyplatform)" = "azure" ]