This post describes how to run Apache on Atomic host. I am using Fedora atomic host.
Boot up an atomic instance (Fedora preferred).
To test the Apache container, just run
atomic run docker.io/fedora/apache
Make sure you are using
After the container has started successfully, Now do
This will display
Now If you want to build your own image copy the source https://github.com/fedora-cloud/Fedora-Dockerfiles/tree/master/apache down to your host.
Then Edit the Dockerfile and make your changes.
Now Build the image:
# docker build --rm -t /httpd .
After the build is successful, Run the container:
# docker run -d -p 80:80 /httpd #To assign port 80 of your host that maps to port 80 on the container
# docker run -d -p 80 /httpd #To assign random port that maps to port 80 on the container
If you do curl http://localhost you will see the required output.