Use combinations of Magento 2 and PHP in a dockerized situation
395
export PHP_VERSION=7.1
export MAGENTO_VERSION=2.3.1
export MAGENTO_HOST=my.dev.url
export MAGENTO_SAMPLEDATA=1
export MAGENTO_PUBLIC=your-magento-access-token-public
export MAGENTO_PRIVATE=your-magento-access-token-private
docker-compose build
docker-compose up -d
You can add .sh files to the init.d directory which will be run after magento is installed The file init.d/sampledata.sh is already existent to provide sampledata installation functionality. Init scripts can be used to install any extension and execute anything needed in addition to the regular installation
If sample data is being installed, you need to provide your access token keys These can be found on: https://developer.magento.com/account/keys
This image has no persistency so that Magento versions can easily be changed Persistency would throw 500 errors as Magento downgrades. MySQL would contain newer versions and a newer schema, causing M2 not to work
If you would like persistency, enable it in the docker-compose file by removing the comment marks Be aware that you cannot downgrade after this, until you completely remove your volumes by using docker volume destroy
docker-compose logs -f
Will show you what the container is currently doing and if magento installed properly
Content type
Image
Digest
Size
320.8 MB
Last updated
over 7 years ago
docker pull wizkunde/magento-docker