Quickstart Magento 2 development (on a Mac)
28 of February, 2016
0. Install and Start Docker
Install Homebrew (if you don’t have it yet)
Get and start Docker Machine from Docker Toolbox.
Setup docker environment into your bash profile.
1. Setup Magento2 Docker Container
Start with creating empty directory for your project.
Setup host for access with friendly name
Run container interactively. You will end up in command line inside of container. Don’t exit it or docker will stop the container.
2. Install Magento2 Community Edition with test data
Once it starts and you are in command line inside of container - install magento via composer.
NB: you will have to provide your Magento Connect repository username/password.
Use existing credentials or generate new ones at Magento Connect > My Account > Connect > Developers > Secure Keys. Username is your public key, password - a private key. ¯\(ツ)/¯
3. …
Now in frontend you should see fully functional Magento 2 shop in developer’s mode. At the time of writing there was an issue, where one stylesheet returns 404 because it is called with {{MEDIA_URL}}/styles.css. It seems to be a known issue with no resolution so far, but doesn’t seem to affect functionality of store.
4. Profit :-)
To stop container just exit the terminal inside of the container.
To bring dev environment up again just start container with interactive mode again.
comments powered by Disqus