Finally systemd is running inside RedHat / CentOS Containers

RHEL Sample

Check it’s up docker ps | grep rhel8

Install Web Server

Validate

Go to your browser http://localhost:8080

Congrats πŸŽ‰πŸŽŠ !!!

docker exec -it rhel8 systemctl enable nginx is useful to auto-start nginx after restarting the container (docker restart rhel8 )

Cleanup

docker rm -f rhel8

Centos Sample

Check it’s up docker ps | grep centos7

Install Web Server

Validate

Go to your browser http://localhost:8080 .

Congrats πŸŽ‰πŸŽŠ !!!

docker exec -it centos7 systemctl enable nginx is useful to auto-start nginx after restarting the container (docker restart centos7 )

Cleanup

docker rm -f centos7

Force it to Work !😎

You may feel like this 😩 if it does not work.

Thus, you can add these options:

πŸŽ‰πŸŽ‰πŸŽ‰πŸŽ‰πŸŽ‰πŸŽ‰πŸŽ‰πŸŽ‰ I am now able to spin up a full staging environment of containers for my Ansible playbooks and point my inventory to them.

--

--

Software engineer, Cloud Architect, 5/5 AWS|GCP|PSM Certified, Owner of kubernetes.tn

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Abdennour Toumi

Abdennour Toumi

Software engineer, Cloud Architect, 5/5 AWS|GCP|PSM Certified, Owner of kubernetes.tn