{"id":15602367,"url":"https://github.com/trfore/docker-centos9-systemd","last_synced_at":"2025-03-29T12:45:34.131Z","repository":{"id":231172841,"uuid":"780980897","full_name":"trfore/docker-centos9-systemd","owner":"trfore","description":"A minimal systemd enabled CentOS Stream 9 image","archived":false,"fork":false,"pushed_at":"2024-10-16T03:47:13.000Z","size":72,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-17T18:36:29.202Z","etag":null,"topics":["ansible-molecule","centos","docker-image","systemd"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/trfore/docker-centos9-systemd","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/trfore.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-02T14:25:06.000Z","updated_at":"2024-10-16T03:47:17.000Z","dependencies_parsed_at":"2024-05-08T04:24:15.502Z","dependency_job_id":"2b08065b-2e50-49cb-8e22-8357e7d340f9","html_url":"https://github.com/trfore/docker-centos9-systemd","commit_stats":null,"previous_names":["trfore/docker-centos9-systemd"],"tags_count":0,"template":false,"template_full_name":"trfore/docker-image","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trfore%2Fdocker-centos9-systemd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trfore%2Fdocker-centos9-systemd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trfore%2Fdocker-centos9-systemd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trfore%2Fdocker-centos9-systemd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trfore","download_url":"https://codeload.github.com/trfore/docker-centos9-systemd/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246187219,"owners_count":20737460,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible-molecule","centos","docker-image","systemd"],"created_at":"2024-10-03T02:41:17.242Z","updated_at":"2025-03-29T12:45:34.124Z","avatar_url":"https://github.com/trfore.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# docker-centos9-systemd\n\n[![CI](https://github.com/trfore/docker-centos9-systemd/actions/workflows/ci.yml/badge.svg)](https://github.com/trfore/docker-centos9-systemd/actions/workflows/ci.yml)\n[![CD](https://github.com/trfore/docker-centos9-systemd/actions/workflows/cd.yml/badge.svg?event=pull_request)](https://github.com/trfore/docker-centos9-systemd/actions/workflows/cd.yml)\n\nA minimal systemd enabled centos9 Docker image for testing Ansible roles with Molecule.\n\nNOTE: This image does NOT contain Ansible tooling, e.g. `ansible-core` or `yamllint`. Thus, the use case is as target\nhost for Ansible controllers or within the Molecule `create`/`converge`/`test` cycle.\n\n## Docker Pull Command\n\n```sh\ndocker pull trfore/docker-centos9-systemd\n```\n\n## How to Build\n\nThis image is built on Docker Hub automatically any time the upstream OS image is rebuilt, and any time a commit is made\nor merged to the `main` branch. But if you need to build the image on your own locally, do the following:\n\n1. Install [docker]\n2. Clone the repo, `git clone https://github.com/trfore/docker-centos9-systemd.git`\n3. `cd` into the directory\n4. Run `docker build --tag trfore/docker-centos9-systemd .`\n\n## How to Use\n\n### Within Molecule Scenario\n\n- Add the following code to your molecule scenario file, e.g. `molecule/default/molecule.yml`.\n\n  ```yaml\n  platforms:\n    - name: instance\n      image: trfore/docker-centos9-systemd:latest\n      tmpfs:\n        - /run\n        - /tmp\n      volumes:\n        - /sys/fs/cgroup:/sys/fs/cgroup:rw\n      cgroupns_mode: host\n      privileged: true\n      pre_build_image: true\n  ```\n\n### Interactively Using Docker\n\n- Install [docker]\n- Build an image locally (see above) or pull from Docker Hub: `docker pull trfore/docker-centos9-systemd:latest`\n- Run a container from the image:\n\n  ```sh\n  docker run -d -it --name centos9-systemd --privileged --cgroupns=host --tmpfs=/run --tmpfs=/tmp --volume=/sys/fs/cgroup:/sys/fs/cgroup:rw trfore/docker-centos9-systemd:latest\n  ```\n\n- Use it, example:\n\n  ```sh\n  docker exec -it centos9-systemd /bin/bash\n  ```\n\n### Using Podman\n\n- Podman defaults to running containers in systemd mode, `--systemd=true`, and will mount the required tmpfs and cgroup\n  filesystem. See [Podman Docs: Commands `run --systemd`] for details.\n\n  ```sh\n  podman run -d -it --name centos9-systemd docker.io/trfore/docker-centos9-systemd:latest\n  ```\n\n## Additional Images\n\n| Base OS                          | Github                      | Docker Hub                         |\n| -------------------------------- | --------------------------- | ---------------------------------- |\n| [CentOS Stream 8][centos-stream] | [docker-centos8-systemd]    | [trfore/docker-centos8-systemd]    |\n| [CentOS Stream 9][centos-stream] | [docker-centos9-systemd]    | [trfore/docker-centos9-systemd]    |\n| [Debian 10][debian]              | [docker-debian10-systemd]   | [trfore/docker-debian10-systemd]   |\n| [Debian 11][debian]              | [docker-debian11-systemd]   | [trfore/docker-debian11-systemd]   |\n| [Debian 12][debian]              | [docker-debian12-systemd]   | [trfore/docker-debian12-systemd]   |\n| [Ubuntu 20.04][ubuntu]           | [docker-ubuntu2004-systemd] | [trfore/docker-ubuntu2004-systemd] |\n| [Ubuntu 22.04][ubuntu]           | [docker-ubuntu2204-systemd] | [trfore/docker-ubuntu2204-systemd] |\n| [Ubuntu 24.04][ubuntu]           | [docker-ubuntu2404-systemd] | [trfore/docker-ubuntu2404-systemd] |\n\n## Maintainers\n\nTaylor Fore (\u003chttps://github.com/trfore\u003e)\n\n## Acknowledgements\n\nInspired by Jeff Geerling's ([@geerlingguy](https://github.com/geerlingguy)), CentOS 8, Debian 10/11, and Ubuntu 20/22\ndocker images for ansible, [geerlingguy/docker-\\*-ansible](https://github.com/geerlingguy?tab=repositories\u0026q=docker-ansible).\n\n## References\n\n- \u003chttps://molecule.readthedocs.io/en/stable/index.html\u003e\n- \u003chttps://molecule.readthedocs.io/en/stable/examples.html#systemd-container\u003e\n- \u003chttps://developers.redhat.com/blog/2016/09/13/running-systemd-in-a-non-privileged-container\u003e\n- [github runner - ubuntu 20.04] preinstalled software\n- [github runner - ubuntu 22.04] preinstalled software\n\n[centos-stream]: https://quay.io/repository/centos/centos?tab=tags\n[debian]: https://hub.docker.com/_/debian/\n[docker]: https://docs.docker.com/engine/installation/\n[ubuntu]: https://hub.docker.com/_/ubuntu/\n[docker-centos8-systemd]: https://github.com/trfore/docker-centos8-systemd/blob/main/Dockerfile\n[docker-centos9-systemd]: https://github.com/trfore/docker-centos9-systemd/blob/main/Dockerfile\n[docker-debian10-systemd]: https://github.com/trfore/docker-debian10-systemd/blob/main/Dockerfile\n[docker-debian11-systemd]: https://github.com/trfore/docker-debian11-systemd/blob/main/Dockerfile\n[docker-debian12-systemd]: https://github.com/trfore/docker-debian12-systemd/blob/main/Dockerfile\n[docker-ubuntu2004-systemd]: https://github.com/trfore/docker-ubuntu2004-systemd/blob/main/Dockerfile\n[docker-ubuntu2204-systemd]: https://github.com/trfore/docker-ubuntu2204-systemd/blob/main/Dockerfile\n[docker-ubuntu2404-systemd]: https://github.com/trfore/docker-ubuntu2404-systemd/blob/main/Dockerfile\n[trfore/docker-centos8-systemd]: https://hub.docker.com/r/trfore/docker-centos8-systemd\n[trfore/docker-centos9-systemd]: https://hub.docker.com/r/trfore/docker-centos9-systemd\n[trfore/docker-debian10-systemd]: https://hub.docker.com/r/trfore/docker-debian10-systemd\n[trfore/docker-debian11-systemd]: https://hub.docker.com/r/trfore/docker-debian11-systemd\n[trfore/docker-debian12-systemd]: https://hub.docker.com/r/trfore/docker-debian12-systemd\n[trfore/docker-ubuntu2004-systemd]: https://hub.docker.com/r/trfore/docker-ubuntu2004-systemd\n[trfore/docker-ubuntu2204-systemd]: https://hub.docker.com/r/trfore/docker-ubuntu2204-systemd\n[trfore/docker-ubuntu2404-systemd]: https://hub.docker.com/r/trfore/docker-ubuntu2404-systemd\n[github runner - ubuntu 20.04]: https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2004-Readme.md\n[github runner - ubuntu 22.04]: https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md\n[Podman Docs: Commands `run --systemd`]: https://docs.podman.io/en/latest/markdown/podman-run.1.html#systemd-true-false-always\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrfore%2Fdocker-centos9-systemd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrfore%2Fdocker-centos9-systemd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrfore%2Fdocker-centos9-systemd/lists"}