Pages

Saturday, January 11, 2014

Apache Web Server on Fedora - Using Docker

Here's how you run it.  This was tested on Docker 0.7.2

Grab the dockerfile:
https://github.com/scollier/Fedora-Dockerfiles

or:

https://git.fedorahosted.org/cgit/dockerfiles.git/

1.  Get Docker version

# docker version

2. Build the image:

Copy the sources down and do the build-

# docker build -rm -t <username>/httpd .

3. Run it (if port 80 is open on your host):

# docker run -d -p 80:80 <username>/httpd

or to assign a random port that maps to port 80 on the container:

# docker run -d -p 80 <username>/httpd

To the port that the container is listening on:

# docker ps

To test:

# curl http://localhost

Here's what it looks like.

No comments:

Post a Comment