Centos 8 Docker container with systemd, useful for tests with ansible
especially with molecule
centos8
,latest
on main branchcentos7
on centos7 branch
- Verify if Docker is installed.
- Run on main branch:
docker build -t docker-centos-systemd:centos8 -t docker-centos-systemd:latest .
- Run on centos7 branch:
docker build -t docker-centos-systemd:centos7 .
- Verify image:
docker images
docker pull eniocarboni/docker-centos-systemd:latest
(or use the image you built earlier).docker run --detach --privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro eniocarboni/docker-centos-systemd:latest
View the run container with
docker ps
Enter in the container with:
docker exec -it <container_id> bash
Kill container with:
docker kill <container_id>
Remove container with:
docker image rm -f <container_id>
Created in 2022 by Enio Carboni
GNU GENERAL PUBLIC LICENSE (see LICENSE file)