Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/antmelekhin/docker-systemd
Docker images with systemd support.
https://github.com/antmelekhin/docker-systemd
ansible docker molecule systemd
Last synced: 21 days ago
JSON representation
Docker images with systemd support.
- Host: GitHub
- URL: https://github.com/antmelekhin/docker-systemd
- Owner: antmelekhin
- License: mit
- Created: 2023-02-11T21:17:51.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-02T18:16:22.000Z (21 days ago)
- Last Synced: 2024-12-02T19:27:25.625Z (21 days ago)
- Topics: ansible, docker, molecule, systemd
- Language: Dockerfile
- Homepage: https://hub.docker.com/r/antmelekhin/docker-systemd
- Size: 34.2 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Docker images with systemd support
Docker containers that uses for Ansible role and playbook testing.
## Supported tags and platforms
Alma Linux:
- `almalinux-8` (`linux/amd64`,`linux/arm64`)
- `almalinux-9` (`linux/amd64`,`linux/arm64`)Amazon Linux:
- `amazonlinux-2` (`linux/amd64`)
- `amazonlinux-2023` (`linux/amd64`,`linux/arm64`)CentOS:
- `centos-7` (`linux/amd64`)
Debian:
- `debian-10` (`linux/amd64`,`linux/arm64`)
- `debian-11` (`linux/amd64`,`linux/arm64`)
- `debian-12` (`linux/amd64`,`linux/arm64`)Fedora:
- `fedora-39` (`linux/amd64`,`linux/arm64`)
- `fedora-40` (`linux/amd64`,`linux/arm64`)Rocky Linux:
- `rockylinux-8` (`linux/amd64`,`linux/arm64`)
- `rockylinux-9` (`linux/amd64`,`linux/arm64`)Ubuntu:
- `ubuntu-18.04` (`linux/amd64`,`linux/arm64`)
- `ubuntu-20.04` (`linux/amd64`,`linux/arm64`)
- `ubuntu-22.04` (`linux/amd64`,`linux/arm64`)
- `ubuntu-24.04` (`linux/amd64`,`linux/arm64`)## Usage
### With Molecule
```yaml
---
dependency:
name: 'galaxy'
enabled: true
driver:
name: 'docker'
platforms:
- name: 'instance-ubuntu'
image: 'antmelekhin/docker-systemd:ubuntu-22.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: 'antmelekhin/docker-systemd:rockylinux-9'
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 and run
- Build the image with `Ubuntu 22.04`
```bash
export DISTR='ubuntu'
export VERSION='22.04'
docker build -t docker-systemd:${DISTR}-${VERSION} -f ${DISTR}/${VERSION}.Dockerfile .
```- Run the container
```bash
docker run -d --name systemd-${DISTR}-${VERSION} --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:rw --cgroupns=host docker-systemd:${DISTR}-${VERSION}
```- Enter to the container
```bash
docker exec -it systemd-${DISTR}-${VERSION} /bin/bash
```- Remove the container
```bash
docker rm -f systemd-${DISTR}-${VERSION}
```## License
MIT
## Author
Melekhin Anton.