Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A minimal systemd enabled Debian 12 image

License

NotificationsYou must be signed in to change notification settings

trfore/docker-debian12-systemd

Repository files navigation

CICD

A minimal systemd enabled debian12 Docker image for testing Ansible roles with Molecule.

NOTE: This image does NOT contain Ansible tooling, e.g.ansible-core oryamllint. Thus, the use case is as targethost for Ansible controllers or within the Moleculecreate/converge/test cycle.

Docker Pull Command

docker pull trfore/docker-debian12-systemd

How to Build

This image is built on Docker Hub automatically any time the upstream OS image is rebuilt, and any time a commit is madeor merged to themain branch. But if you need to build the image on your own locally, do the following:

  1. Installdocker
  2. Clone the repo,git clone https://github.com/trfore/docker-debian12-systemd.git
  3. cd into the directory
  4. Rundocker build --tag trfore/docker-debian12-systemd .

How to Use

Within Molecule Scenario

  • Add the following code to your molecule scenario file, e.g.molecule/default/molecule.yml.

    platforms:  -name:instanceimage:trfore/docker-debian12-systemd:latesttmpfs:      -/run      -/tmpvolumes:      -/sys/fs/cgroup:/sys/fs/cgroup:rwcgroupns_mode:hostprivileged:truepre_build_image:true

Interactively Using Docker

  • Installdocker

  • Build an image locally (see above) or pull from Docker Hub:docker pull trfore/docker-debian12-systemd:latest

  • On Docker with Cgroup V1 (e.g. Ubuntu 20.04), run a container from the image:

    docker run -d -it --name debian12-systemd --privileged --cgroupns=host --tmpfs=/run --tmpfs=/tmp --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro trfore/docker-debian12-systemd:latest
  • On Docker with Cgroup V2 (e.g. Ubuntu 22.04), run a container from the image:

    docker run -d -it --name debian12-systemd --privileged --cgroupns=host --tmpfs=/run --tmpfs=/tmp --volume=/sys/fs/cgroup:/sys/fs/cgroup:rw trfore/docker-debian12-systemd:latest
  • Use it, example:

    dockerexec -it debian12-systemd /bin/bash

Using Podman

  • Podman defaults to running containers in systemd mode,--systemd=true, and will mount the required tmpfs and cgroupfilesystem. SeePodman Docs: Commandsrun --systemd for details.

    podman run -d -it --name debian12-systemd docker.io/trfore/docker-debian12-systemd:latest

Additional Images

Base OSGithubDocker Hub
CentOS Stream 8docker-centos8-systemdtrfore/docker-centos8-systemd
CentOS Stream 9docker-centos9-systemdtrfore/docker-centos9-systemd
Debian 10docker-debian10-systemdtrfore/docker-debian10-systemd
Debian 11docker-debian11-systemdtrfore/docker-debian11-systemd
Debian 12docker-debian12-systemdtrfore/docker-debian12-systemd
Ubuntu 20.04docker-ubuntu2004-systemdtrfore/docker-ubuntu2004-systemd
Ubuntu 22.04docker-ubuntu2204-systemdtrfore/docker-ubuntu2204-systemd
Ubuntu 24.04docker-ubuntu2404-systemdtrfore/docker-ubuntu2404-systemd

Maintainers

Taylor Fore (https://github.com/trfore)

Acknowledgements

Inspired by Jeff Geerling's (@geerlingguy), CentOS 8, Debian 10/11, and Ubuntu 20/22docker images for ansible,geerlingguy/docker-*-ansible.

References


[8]ページ先頭

©2009-2025 Movatter.jp