This Dockerfile builds a Fedora 32 based container, capable to use systemd
, mainly for Ansible role testing.
Tags are used to distinguish between Ansible versions and builds (e.g., testing vs stable).
latest
: Latest stable version of Ansible.
-
Install Docker.
-
Clone the repository:
git clone https://github.com/chzerv/fedora32-systemd-ansible.git
-
cd
into the directory and rundocker build -t fedora32-systemd-ansible .
docker
can be substituted for any other container engine, e.g., Podman.
-
Install Docker.
-
Pull this image from Docker hub:
docker pull chzerv/fedora32-systemd-ansible:latest
If you built the image locally, feel free to use it instead.
-
Run a container:
docker run -d --privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro fedora32-systemd-ansible:latest
-
Run Ansible inside that container:
docker exec -it $container_id ansible --version
This image is used for testing Ansible roles and playbooks locally and/or in CI, hence, security is not a concern. It is not intended or recommended to use this image in production environments.