Skip to content

Commit

Permalink
Replace docker with podman to make systemd work
Browse files Browse the repository at this point in the history
New systemd versions on the host break systemd on the container
systemd/systemd#19245
  • Loading branch information
gjhenrique committed Sep 10, 2021
1 parent dd3df35 commit 10cf31f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 29 deletions.
18 changes: 1 addition & 17 deletions molecule/default/Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -1,21 +1,5 @@
FROM debian:buster
FROM docker.io/debian:buster

RUN apt-get update && apt-get install -y python3 systemd

ENV container docker
ENV LC_ALL C

RUN cd /lib/systemd/system/sysinit.target.wants/ \
&& ls | grep -v systemd-tmpfiles-setup | xargs rm -f $1

RUN rm -f /lib/systemd/system/multi-user.target.wants/* \
/etc/systemd/system/*.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/basic.target.wants/* \
/lib/systemd/system/anaconda.target.wants/* \
/lib/systemd/system/plymouth* \
/lib/systemd/system/systemd-update-utmp*

ENTRYPOINT ["/lib/systemd/systemd"]
14 changes: 4 additions & 10 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,17 @@
dependency:
name: galaxy
driver:
name: docker
name: podman
lint: |
set -e
yamllint .
ansible-lint
platforms:
- name: local
image: debian:buster
tmpfs:
- /tmp
- /run
image: debian
pre_build_image: false
systemd: always
privileged: true
port_bindings:
- 9092: 9092
- 9118: 9118
published_ports:
# nginx Transmission
- 0.0.0.0:9092:9092/TCP
Expand All @@ -25,8 +21,6 @@ platforms:
# syncthing
# Different port to not mess up with local syncthing
- 0.0.0.0:8385:8384/TCP
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:ro"
provisioner:
name: ansible
config_options:
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ansible==4.5.0
ansible-lint==5.1.3
molecule[docker,ansible,lint]==3.4.0
molecule-docker==1.0.2
molecule[ansible,lint]==3.4.0
molecule-podman==1.0.1
passlib

0 comments on commit 10cf31f

Please sign in to comment.