Docker Containers for Magento
After working for a few months on a development environment for my Magento projects, I’d like to share my Docker codebase with you all.
It’s design to launch your application on the top of Docker regardless of your operational system. Although, I’ve only tested it on Linux and Mac OS. You can download the code from my Github repository here.
Please feel free to fork and/or suggest improvements.
Information about how to install docker here.
Install docker composer using the documentation here.
Docker Machine (Required for Non-Linux OS)
Docker Machine NFS (Required for Non-Linux OS)
Speed things up with NFS volumes. Documentation here.
In order to create a Docker environment, please follow the commands below
1 – Create your Docker environment folder based on the docker-codebase:
git clone firstname.lastname@example.org:souldigital/docker-codebase.git docker-sample.com.au
2 – Go into the folder and move the .git folder
cd docker-sample.com.au mv .git .git_docker_codebase
3 – Create your environment files based on the sample ones.
cp env.sh_sample env.sh cp install_commands.sh_sample install_commands.sh cp docker-compose.yml_sample docker-compose.yml
3.1 – Please update those new files with your project’s details
vi env.sh vi install_commands.sh
3.2 – Add your docker repository.
git init git remote add origin email@example.com:souldigital/docker-sample.com.au.git
4 – Docker-Machine (Required for Non-Linux OS)
Create the virtual machine (Required for Windows/MacOS). You might want to change it for your own needs.
docker-machine create --driver virtualbox \ --virtualbox-cpu-count "2" \ --virtualbox-memory "4096" \ --virtualbox-disk-size "64000" \ dev
6 – Run the command below to set up the project.
7 – Once your project is setup, you can load it any time by using