A quick and dirty LAMP setup for Docker
Find a file
2016-08-24 07:49:08 -05:00
config Fixed remote connections with both PHPMyAdmin and MySQL Workbench/other third party tools 2016-05-26 16:05:29 -05:00
public_html Added some cheat sheet commands and changed the style of the mysql connection status 2016-05-26 13:26:47 -05:00
docker-compose.yml Removed /etc/localtime from docker-compose file for portability 2016-08-23 20:04:20 -05:00
Dockerfile Started cron with the container 2016-07-26 12:55:58 -05:00
README.md Update README.md 2016-08-24 07:49:08 -05:00

Docker LAMP Stack for Magento

To get started, first download and install Docker.

From the docker-lamp directory, you can run

docker-compose up -d

This will take some time because Docker will have to fetch and configure the image for the LAMP stack.

Once you have your Docker machine running, you can place your files in the public_html folder. The other folders contain configuration files, so it's not recommended to add files to them or modify them in any way.

By using either the container id or its name, you can connect to them with the following command:

docker exec -it CONTAINER_NAME/ID /bin/bash

Replace CONTAINER_NAME/ID with the name or id of the container you'd like to connect to, and you will be dropped into a bash environment where you can run commands like importing a large database into MySQL or running composer or magerun (both of which are already installed and ready to use.)

So, to run a composer installation, you would need to first run

docker exec -it dockerlamp_app_1 /bin/bash

to gain access to the shell, and then you could cd into the correct directory and run your composer install command. From here, you could also run MySQL, vim, etc.

DISCLAIMER:

This Docker machine should under NO circumstances, be used in a production environment. This is solely intended for local development, and has numerous security concerns that would need to be addressed prior to being a feasible production candidate. You have been warned.