RHEL/Debian based docker containers with systemd.
10K+
Reusable multi-distribution Docker images with working systemd support for Ansible role testing, Molecule scenarios, CI jobs, and other cases where a minimal base image is not enough.
Source repository: https://github.com/msavdert/docker-systemd
Images are published to both registries:
melihsavdert/docker-systemd:<tag>
ghcr.io/msavdert/docker-systemd:<tag>
Examples:
melihsavdert/docker-systemd:ubuntu-24.04melihsavdert/docker-systemd:amazonlinux-2melihsavdert/docker-systemd:oraclelinux-9No latest tag is published by design. Use an explicit distro-version tag to keep tests deterministic.
docker run -d --name systemd-ubuntu-24.04 \
--privileged \
-v /sys/fs/cgroup:/sys/fs/cgroup:rw \
--cgroupns=host \
ghcr.io/msavdert/docker-systemd:ubuntu-24.04
Most upstream container images are intentionally minimal. That is usually the right default, but it is not ideal when you need a realistic systemd-based environment for infrastructure testing.
These images are built for cases where you need:
systemctl to workThe tag name is always the full distro identifier, not just the version number. For example, use amazonlinux-2, not only 2.
| Family | Published tags | Platforms |
|---|---|---|
| AlmaLinux | almalinux-8, almalinux-9, almalinux-10 | linux/amd64, linux/arm64 |
| Amazon Linux | amazonlinux-2, amazonlinux-2023, amazonlinux-2027 (preview) | amazonlinux-2: linux/amd64amazonlinux-2023, amazonlinux-2027: linux/amd64, linux/arm64 |
| CentOS | centos-7 | linux/amd64 |
| Debian | debian-10, debian-11, debian-12, debian-13, debian-forky (preview) | linux/amd64, linux/arm64 |
| Fedora | fedora-39, fedora-40, fedora-41, fedora-42, fedora-43, fedora-44, fedora-45 (preview) | linux/amd64, linux/arm64 |
| openSUSE | opensuse-15.6, opensuse-16.0, opensuse-16.1, opensuse-tumbleweed | linux/amd64, linux/arm64 |
| Oracle Linux | oraclelinux-7, oraclelinux-8, oraclelinux-9, oraclelinux-10 | linux/amd64, linux/arm64 |
| Rocky Linux | rockylinux-8, rockylinux-9, rockylinux-10 | linux/amd64, linux/arm64 |
| Ubuntu | ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, ubuntu-26.04, ubuntu-26.10 | linux/amd64, linux/arm64 |
Tags marked "preview" track a pre-release or moving upstream and carry no stability guarantee:
fedora-45: Fedora 45 is in beta until its final release.amazonlinux-2027: AWS public preview, not for production. General availability has not been announced.debian-forky: Debian testing. It has no release date, and its content changes with each weekly rebuild.ubuntu-26.10 is an interim release, supported until about July 2027.
These tags are frozen because their upstream distributions are end of life:
amazonlinux-2centos-7debian-10debian-11fedora-39fedora-40fedora-41oraclelinux-7They stay published so existing pipelines keep working, but they are no longer rebuilt on the weekly schedule. They are rebuilt only when their own Dockerfile changes, so their contents age and may contain unpatched CVEs. Use them for legacy testing only, and prefer a supported tag for anything new. debian-11 is built against archive.debian.org, because its repositories were removed from the regular Debian mirrors. The weekly schedule and the change detection that selects which images are built are described in .github/workflows/build-and-push.yml.
Tags are rebuilt weekly (end-of-life tags excepted, see above), so a tag such as debian-12 moves over time as packages and base images are updated. Dated tags of the form <distro-version>-YYYYMMDD (for example debian-12-20261017) are also published. Use a dated tag when you need a reproducible image.
docker pull melihsavdert/docker-systemd:amazonlinux-2
docker pull ghcr.io/msavdert/docker-systemd:amazonlinux-2
docker run -d --name systemd-rocky-10 \
--privileged \
-v /sys/fs/cgroup:/sys/fs/cgroup:rw \
--cgroupns=host \
melihsavdert/docker-systemd:rockylinux-10
---
dependency:
name: galaxy
driver:
name: docker
platforms:
- name: instance-ubuntu
image: melihsavdert/docker-systemd:ubuntu-24.04
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
- /var/lib/containerd
cgroupns_mode: host
privileged: true
pre_build_image: true
groups:
- debian_family
- name: instance-rocky
image: melihsavdert/docker-systemd:rockylinux-10
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
- /var/lib/containerd
cgroupns_mode: host
privileged: true
pre_build_image: true
groups:
- rhel_family
provisioner:
name: ansible
verifier:
name: ansible
export DISTR='ubuntu'
export VERSION='24.04'
docker build \
-t docker-systemd:${DISTR}-${VERSION} \
-f ${DISTR}/${VERSION}.Dockerfile \
.
docker run -d --name systemd-${DISTR}-${VERSION} \
--privileged \
-v /sys/fs/cgroup:/sys/fs/cgroup:rw \
--cgroupns=host \
docker-systemd:${DISTR}-${VERSION}
docker exec -it systemd-${DISTR}-${VERSION} /bin/bash
Each image follows the same baseline approach:
The repository is maintained with four focused workflows:
validate.yml lints Dockerfiles and test-builds images on pull requestsbuild-and-push.yml publishes images to Docker Hub and GHCR on main and on a weekly schedule; scheduled builds skip end-of-life imagesrelease.yml manages GitHub releases and updates CHANGELOG.md with semantic-releasedockerhub-description.yml syncs README.md to Docker HubReleases are generated with semantic-release and conventional commits.
feat: for new images or supported versionsfix: for image fixesrefactor: for internal cleanup with user-visible effectdocs(README): for README changes that should produce a patch release.github/matrix.json.GITHUB_TOKEN and linked back to this repository through OCI source metadata.Not Found, confirm that the target Docker Hub repository exists and that the configured credentials can update its metadata.GNU General Public License v3.0 or later (GPL-3.0-or-later). See LICENSE.
Melih Savdert
Content type
Image
Digest
sha256:9b394c156…
Size
99.6 MB
Last updated
7 days ago
docker pull melihsavdert/docker-systemd:oraclelinux-9-20261018