Public | Automated Build

Last pushed: 2 years ago
Short Description
Apache + PHP + xdebug on
Full Description

Docker Apache PHP

Apache - 2.4.7</br>
PHP - 5.5.9<br/>
MySQL - 5.5.46

To Build

$ docker build -t docker-apache-php .

To Run

Use docker volumes to expose
your web content to the apache web server.

# run docker apache php as deamon with expose your web content to the apache web server
$ CONTAINER=$(docker run -p 80 -p 3306 -v /var/www/html:/var/www/html -d docker-apache-php)

# get the http port
$ docker port $CONTAINER 80
0.0.0.0:49206

To access the database

# get the mysql port
$ docker port $CONTAINER 3306
0.0.0.0:49205

# get [dockerhost] IP reading 'inet addr' value
$ ifconfig docker0 | grep 'inet addr'
          inet addr:172.17.42.1  Bcast:0.0.0.0  Mask:255.255.0.0

$ mysql -h172.17.42.1 -uroot -P 49205
Docker Pull Command
Owner
grzegorzwodo