Skip to content

dannynimmo/magento2-dev-env

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Magento 2 Docker Development Environment

This repo contains a quick & simple way to run a development environment for Magento 2 within Docker.

Quick Start

  1. Download the latest docker-compose.yml file to your Magento 2 project root
    curl -O https://raw.githubusercontent.com/dannynimmo/magento2-dev-env/master/docker-compose.yml
  2. Bring up the containers. By default the webserver will be accessible over port 8001, and the database over port 33061 (feel free to change these).
    docker-compose up -d

Usage

n98-magerun

n98-magerun is installed in the image by default. We can use docker-compose exec to run it:

docker-compose exec app magerun [arguments]

Logs

Logs are routed to stderr within each container, and can therefore be viewed using docker-compose logs:

docker-compose logs --follow

Database

The database can be accessed from your local machine using your GUI of choice (I recommend the excellent Sequel Pro for MacOS) and the below details:

Host Port Username Password Database
your Docker IP 33061 root root magento2

Changelog

The changelog for this project is located in the CHANGELOG.md file.