GitXplorerGitXplorer
p

h5bp-docker-apache-server

public
0 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
9fd2695a9bda9dbc2e1f8d7fc8ec13dab2c42b29

initial commit

ppatrickkettner committed 10 years ago

README

The README file for this repository.

h5bp Apache Server Docker Image is a base Dockerfile that allows you to build an Apache server for your own app with the best practices in mind.

Usage

You can download the image from the docker hub

docker pull patrickkettner/h5bp-server-configs-apache

or build the included Dockerfile from within the project

docker build -t patrickkettner/h5bp-server-configs-apache .

Starting the container

docker run -d -p 49000:80 patrickkettner/h5bp-server-configs-apache

Where 49000 is the local port, and 80 is the port apache is listening on

Connecting to the container

Docker only runs on linux, and as a result, if you want to run this on OS X or Windows, you will need to virtualize a linux host. That additional level of indirection breaks port forwarding.

boot2docker suggests using VMWare's port mapping feature to fix this

With the virtual machine installed and stopped, you can run the following

for i in {49000..49900}; do
  VBoxManage modifyvm "boot2docker-vm" --natpf1 "tcp-port$i,tcp,,$i,,$i";
  VBoxManage modifyvm "boot2docker-vm" --natpf1 "udp-port$i,udp,,$i,,$i";
done

to forward the VMs ports 49000 to 49900 to the same port on localhost.

In order to reverse this change, simply run

for i in {49000..49900}; do
  VBoxManage modifyvm "boot2docker-vm" --natpf1 delete "tcp-port$i";
  VBoxManage modifyvm "boot2docker-vm" --natpf1 delete "udp-port$i";
done

For more detailed information on configuration files, see the h5bp apache documentation

License

h5bp Apache Server Docker Image is available under the MIT license.