Sign inSign up

melihsavdert/docker-systemd

By melihsavdert

•Updated 7 days ago

RHEL/Debian based docker containers with systemd.

Image
Developer tools
Operating systems
1

10K+

melihsavdert/docker-systemd repository overview

⁠Docker images with systemd support

Build Release Docker Hub

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.04
  • melihsavdert/docker-systemd:amazonlinux-2
  • melihsavdert/docker-systemd:oraclelinux-9

No latest tag is published by design. Use an explicit distro-version tag to keep tests deterministic.

⁠Quick start

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

⁠Why this repository exists

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 work
  • distro-native package managers and filesystem layout
  • predictable service behavior during Molecule or CI runs
  • a consistent tagging model across multiple Linux families

⁠Supported tags

The tag name is always the full distro identifier, not just the version number. For example, use amazonlinux-2, not only 2.

FamilyPublished tagsPlatforms
AlmaLinuxalmalinux-8, almalinux-9, almalinux-10linux/amd64, linux/arm64
Amazon Linuxamazonlinux-2, amazonlinux-2023, amazonlinux-2027 (preview)amazonlinux-2: linux/amd64
amazonlinux-2023, amazonlinux-2027: linux/amd64, linux/arm64
CentOScentos-7linux/amd64
Debiandebian-10, debian-11, debian-12, debian-13, debian-forky (preview)linux/amd64, linux/arm64
Fedorafedora-39, fedora-40, fedora-41, fedora-42, fedora-43, fedora-44, fedora-45 (preview)linux/amd64, linux/arm64
openSUSEopensuse-15.6, opensuse-16.0, opensuse-16.1, opensuse-tumbleweedlinux/amd64, linux/arm64
Oracle Linuxoraclelinux-7, oraclelinux-8, oraclelinux-9, oraclelinux-10linux/amd64, linux/arm64
Rocky Linuxrockylinux-8, rockylinux-9, rockylinux-10linux/amd64, linux/arm64
Ubuntuubuntu-20.04, ubuntu-22.04, ubuntu-24.04, ubuntu-26.04, ubuntu-26.10linux/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.

⁠End-of-life images

These tags are frozen because their upstream distributions are end of life:

  • amazonlinux-2
  • centos-7
  • debian-10
  • debian-11
  • fedora-39
  • fedora-40
  • fedora-41
  • oraclelinux-7

They 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.

⁠Pinning

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.

⁠Usage

⁠Pull an image
docker pull melihsavdert/docker-systemd:amazonlinux-2
docker pull ghcr.io/msavdert/docker-systemd:amazonlinux-2
⁠Run a container
docker run -d --name systemd-rocky-10 \
  --privileged \
  -v /sys/fs/cgroup:/sys/fs/cgroup:rw \
  --cgroupns=host \
  melihsavdert/docker-systemd:rockylinux-10
⁠Use with Molecule
---
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

⁠Build locally

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

⁠Image rules

Each image follows the same baseline approach:

  • install only what is needed for a usable systemd-based test environment
  • prune unnecessary unit wants to reduce noise and boot overhead
  • keep distro-specific handling isolated to the places where it is required
  • use native systemd startup instead of shell wrapper entrypoints

⁠Automation

The repository is maintained with four focused workflows:

  • validate.yml lints Dockerfiles and test-builds images on pull requests
  • build-and-push.yml publishes images to Docker Hub and GHCR on main and on a weekly schedule; scheduled builds skip end-of-life images
  • release.yml manages GitHub releases and updates CHANGELOG.md with semantic-release
  • dockerhub-description.yml syncs README.md to Docker Hub

⁠Release notes

Releases are generated with semantic-release and conventional commits.

  • feat: for new images or supported versions
  • fix: for image fixes
  • refactor: for internal cleanup with user-visible effect
  • docs(README): for README changes that should produce a patch release

⁠Maintenance notes

  • Dependabot is configured for GitHub Actions and for the Docker base images in the distro directories. Major and minor base image bumps are ignored, because the supported versions are defined by .github/matrix.json.
  • GHCR packages are published from GitHub Actions with GITHUB_TOKEN and linked back to this repository through OCI source metadata.
  • If Docker Hub description sync reports Not Found, confirm that the target Docker Hub repository exists and that the configured credentials can update its metadata.

⁠License

GNU General Public License v3.0 or later (GPL-3.0-or-later). See LICENSE⁠.

⁠Author

Melih Savdert

Tag summary

Content type

Image

Digest

sha256:9b394c156…

Size

99.6 MB

Last updated

7 days ago

docker pull melihsavdert/docker-systemd:oraclelinux-9-20261018