-
Add the Composer Repositories
docker run -it -v $(pwd):/app/ -v ~/.composer/:/root/.composer/ magento/magento-cloud-docker-php:7.3-cli-1.1 bash -c 'composer config repositories.mcd vcs [email protected]:magento/magento-cloud-docker.git' docker run -it -v $(pwd):/app/ -v ~/.composer/:/root/.composer/ magento/magento-cloud-docker-php:7.3-cli-1.1 bash -c 'composer config repositories.et vcs [email protected]:magento/ece-tools.git'
-
composer require the cloud docker and ece tools packages
docker run -it -v $(pwd):/app/ -v ~/.composer/:/root/.composer/ magento/magento-cloud-docker-php:7.3-cli-1.1 bash -c 'composer require "magento/magento-cloud-docker:1.1" "magento/ece-tools"'
-
Add the required files from the Magento Cloud package
.magento/ (entire folder) .magento.app.yaml magento-vars.php php.ini
-
Modify the configuration to match the project
-
Copy in env.php to app/etc/
app/etc/env.php is required for the crypt key setting, as well as any other custom configuration.
- Put a database dump in .docker/mysql/docker-entrypoint-initdb.d/
This is inserted when the database comes up, and is much quicker than a full install from scratch. The database itself is not changed.
-
Generate docker-compose
docker run -it -v $(pwd):/app/ -v ~/.composer/:/root/.composer/ magento/magento-cloud-docker-php:7.3-cli-1.1 bash -c "./vendor/bin/ece-docker build:compose --sync-engine=native --mode=developer"
-
Bring up Containers
docker-compose up -d