This repo contains a quick & simple way to run a development environment for Magento 2 within Docker.
- Download the latest
docker-compose.yml
file to your Magento 2 project rootcurl -O https://raw.githubusercontent.com/dannynimmo/magento2-dev-env/master/docker-compose.yml
- 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
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 are routed to stderr within each container, and can therefore be viewed using docker-compose logs
:
docker-compose logs --follow
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 |
The changelog for this project is located in the CHANGELOG.md file.