lnmpa-apache is an Apache Server boxed in a Docker image built by Tommy Lau.
This image is a php web development environment cooked based on the offical docker image php:apache, and with the following enhancements.
WARNING: The php.ini is set to development, it is highly recommended NOT to run this image for production enivornments.
Fixed:
Enabled:
Framework support:
Other:
-v argumentGet the docker image by running the following commands:
docker pull tommylau/apache
Start an instance:
docker run --name apache -v /path/to/web:/var/www/html -p 80:80 -d tommylau/apache
This will start an instance, and you are ready to go.
If you are running boot2docker under MacOS or Windows, it is a good idea to add BOOT2DOCKER=1 as an environment variable. In this way, Apache2 will run under user docker (uid 1000) and group staff (gid 50), so that PHP won't complain about the permission denied when you try to write something to the disk through PHP, like say, upload an image to server.
docker run --name apache -v /path/to/web:/var/www/html -p 80:80 -e BOOT2DOCKER=1 -d tommylau/apache
To use this image linking with MySQL, you have to have a running MySQL instance, more information about MySQL docker image, please refer to tommylau/mysql. Suppose you have a MySQL instance named mysql5.6_server, we can link it in our Apache2 instance with the name mysql like this:
docker run --name apache -v /path/to/web:/var/www/html --link mysql5.6_server:mysql -p 80:80 -d tommylau/apache
Then in the instance, you can use the hostname mysql to connect to the database.
Content type
Image
Digest
sha256:e62ef25ae…
Size
166.8 MB
Last updated
almost 11 years ago
docker pull tommylau/apache