From b25d27a890096df306fd1214d373adb5269216e2 Mon Sep 17 00:00:00 2001 From: Florian Rey Date: Tue, 12 Dec 2023 12:07:55 +0100 Subject: [PATCH] [Elao - App - Docker] Switch to systemd --- elao.app.docker/.manala/Makefile.tmpl | 2 +- elao.app.docker/.manala/docker/Dockerfile.tmpl | 5 +++-- elao.app.docker/.manala/docker/compose/init.systemd.yaml | 5 ++++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/elao.app.docker/.manala/Makefile.tmpl b/elao.app.docker/.manala/Makefile.tmpl index e37bd7ef..5a0a48ed 100644 --- a/elao.app.docker/.manala/Makefile.tmpl +++ b/elao.app.docker/.manala/Makefile.tmpl @@ -31,7 +31,7 @@ MANALA_DOCKER_COMPOSE_ENV += \ MANALA_HOST_OS=$(MANALA_OS) \ MANALA_HOST_DIR=$(abspath $(MANALA_DIR)) MANALA_DOCKER_COMPOSE_FILE += \ - $(MANALA_DIR)/.manala/docker/compose/init.sysv.yaml \ + $(MANALA_DIR)/.manala/docker/compose/init.systemd.yaml \ $(if $(SYMFONY_IDE), $(MANALA_DIR)/.manala/docker/compose/symfony.yaml) MANALA_DOCKER_COMPOSE_PROFILE ?= development diff --git a/elao.app.docker/.manala/docker/Dockerfile.tmpl b/elao.app.docker/.manala/docker/Dockerfile.tmpl index 03f96618..bfd3cd95 100644 --- a/elao.app.docker/.manala/docker/Dockerfile.tmpl +++ b/elao.app.docker/.manala/docker/Dockerfile.tmpl @@ -175,17 +175,18 @@ RUN \ > /etc/sudoers.d/systemd \ && rm -rf \ /etc/systemd/system/*.wants/* \ + /lib/systemd/system/basic.target.wants/* \ /lib/systemd/system/multi-user.target.wants/* \ /lib/systemd/system/local-fs.target.wants/* \ /lib/systemd/system/sockets.target.wants/*udev* \ /lib/systemd/system/sockets.target.wants/*initctl* \ /lib/systemd/system/sysinit.target.wants/systemd-tmpfiles-setup-dev* \ + /lib/systemd/system/systemd-ask-password-console.* \ + /lib/systemd/system/systemd-tmpfiles-clean.* \ /lib/systemd/system/systemd-update-utmp* \ # Clean && rm -rf /var/lib/apt/lists/* -VOLUME /sys/fs/cgroup - STOPSIGNAL SIGRTMIN+3 CMD ["/lib/systemd/systemd"] diff --git a/elao.app.docker/.manala/docker/compose/init.systemd.yaml b/elao.app.docker/.manala/docker/compose/init.systemd.yaml index 9d79cd5c..48309b6c 100644 --- a/elao.app.docker/.manala/docker/compose/init.systemd.yaml +++ b/elao.app.docker/.manala/docker/compose/init.systemd.yaml @@ -8,7 +8,10 @@ services: build: args: MANALA_INIT: systemd + cgroup: host tty: true - privileged: true + tmpfs: + - /run + - /run/lock volumes: - /sys/fs/cgroup:/sys/fs/cgroup:rw