Public Repository

Last pushed: 2 years ago
Short Description
LAMP stack including Magento 2 in one container, ready to be installed.
Full Description
  • Ubuntu Xeniel Xerus 16.04 (scheduled for release April 2016)
  • PHP 7
  • MySQL 5.6
  • Apache 2.4
  • Composer

After pulling this image you can run it e.g. with

docker run -p 80:80 -v /host/src/path:/var/www/html/magento -it openstreamch/magento2:2.0.4

Replace /host/src/path with your local path to your Magento 2 source, which will expose your Magento 2 source code on the local machine to access it with your IDE of choice. docker run will ssh you into the container. In the Magento root folder located at /var/www/html/magento you can execute Composer and Magento CLI commands.

Before you can access the installer in your browser you have to start Apache and MySQL

service mysql start
service apache2 start

To determine your docker machine IP address use

docker-machine ip

which will then also allow you to assign a custom domain in your /etc/hosts files, e.g.    docker.openstream

Database Credentials

  • Database Server Host: localhost
  • Database Server Username: root
  • Database Server Password: root
  • Database Name: magento2_demo


This was initially set up without shared Magento source files and after adding the -v flag to the docker run command there now are problems with permissions when accessing the Magento installer in the browser. Managing permissions on shared volumes is not so trivial, so we first need to figure this out. If you just want to run Magento 2 without needing access to the source code on your local machine, you can just run docker like so

docker run -p 80:80 -it openstreamch/magento2:2.0.4

and then download or clone the Magento 2 source code directly in the container's /var/www/html/magento/public_html folder.

Docker Pull Command