Public Repository

Last pushed: 9 months ago
Short Description
Development LAMP stack with Mongodb also installed.
Full Description

This is a development image that contains a standard LAMP stack, as well as Mongodb. PHP version is 5.5.9.

Database

Both MySQL and Mongodb are installed and run on startup. The ports are exposed for both if you want to connect from outside the container.

  • MySQL port: 3306
  • Mongodb port: 27017, 28017

The username/password for MySQL is:

  • username: admin
  • password: admin

For information on volumes for each database, see the volumes section below.

Volumes

/var/www/html

This is the root location for your application.

Example:

docker run -v $(pwd)/html:/var/www/html the1stmovement/lammp:1.0.0
/data/db

This is the location if you want to store your Mongodb data locally

Example:

docker run -v $(pwd)/mongo_data:/data/db the1stmovement/lammp:1.0.0
/var/lib/mysql

This is the location if you want to stor you MySQL data locally

Example:

docker run -v $(pwd)/mysql_data:/var/lib/mysql the1stmovement/lammp:1.0.0

Xdebug

Xdebug has been installed in this image, but due to networking constraints, can't reach IDEs outside of the container.
To resolve this, you need to add a host called "docker_host" when running a container.

This image is already set up to listen to docker_host, so you need to assign an IP address when you run the container. This can be done with the following parameter:

docker run --add-host="docker_host:192.168.1.6" the1stmovement/lammp:1.0.0

If you are on a mac, you can create an alias that will loopback to your local machine with the following command:

sudo ifconfig lo0 alias 10.200.10.1/24

You can then run the container with the IP address from the alias:

docker run --add-host="docker_host:10.200.10.1" the1stmovement/lammp:1.0.0

For more information about debugging outside of the container, see this article:

https://joenyland.github.io/blog/debug-a-php-app-in-a-docker-container-using-xdebug/

Additional Example

docker run -p 80:80 -p 3306:3306 -p 27017:27017 -v $(pwd)/html:/var/www/html --add-host="docker_host:10.200.10.1" -d the1stmovement/lammp:1.0.0
Docker Pull Command
Owner
the1stmovement