Example 1: Build a HTTP Server

Run a container with forwarding the port 8080 to 80:

docker run -i -p 8080:80 -t ubuntu /bin/bash

On the container, install apache2 and start the service:

apt-get install -y apache2 && /etc/init.d/apache2 start

Now the HTTP Server should be running at http://192.168.99.100:8080