Systemd Debian Container Images for testing Ansible roles with Molecule and Podman. Supported Debian versions:
13- Trixie12- Bookworm
Images are built weekly via GitHub Actions and can be downloaded from the GitHub Package Registry.
These tags are available. They are updated on changes to the main branch
and are automatically rebuilt once a week.
ghcr.io/theoborealis/debian-systemd-podman:13ghcr.io/theoborealis/debian-systemd-podman:12
| Feature | Status | Notes |
|---|---|---|
| systemd | ✅ | Runs as PID 1 |
| ansible systemd module | ✅ | Full support |
| podman | ✅ | Full support |
| docker-compose | ✅ | Run compose files inside container via podman socket |
| bridge networking | ✅ | Via volume mount /proc/sys/net |
-
Run the container via Podman (unprivileged):
podman run -it --systemd=true \ --cap-add SYS_ADMIN,NET_ADMIN \ --device /dev/fuse \ -v /proc/sys/net:/proc/sys/net:rw \ ghcr.io/theoborealis/debian-systemd-podman:12
--cap-add SYS_ADMIN,NET_ADMIN- required for nested containers--device /dev/fuse- required for fuse-overlayfs-v /proc/sys/net:/proc/sys/net:rw- network sysctl access (isolated in container network namespace)
This image is designed for testing Ansible roles with Molecule.
---
driver:
name: podman
platforms:
- name: instance
image: ghcr.io/theoborealis/debian-systemd-podman:12
systemd: true
command: /lib/systemd/systemd
capabilities:
- SYS_ADMIN
- NET_ADMIN
devices:
- /dev/fuse
volumes:
- /proc/sys/net:/proc/sys/net:rw
pre_build_image: true
provisioner:
name: ansible
verifier:
name: ansible- systemd (PID 1)
- podman + docker-compose (run compose files inside container)
- Non-root
ansibleuser with sudo access
For podman-in-podman support:
/etc/subuid,/etc/subgidconfigured for user namespacescgroup_manager = "cgroupfs"in/etc/containers/containers.confDOCKER_HOST=unix:///run/podman/podman.sockfor docker-compose compatibility
# Enter the container
podman exec -it <container_name> bash
# Check systemd
systemctl status
# Check podman
podman run --rm alpine echo hello
# Check docker-compose
docker-compose versionForked from https://github.com/hifis-net/debian-systemd