Collection of Magento 2 Cloud Docker docker-compose configuration files for running open source with Magento 2 Cloud Docker development environment.
git clone [email protected]:DominicWatts/Magento2OpenDocker.git ./
rm .git -rf
127.0.0.1 magento2.docker
Inside ./
mkdir '__project'
bin/local cli
cd __project
composer create-project --repository-url=https://mirror.mage-os.org/ magento/project-community-edition:2.4.4-p2 ./
composer global config http-basic.repo.magento.com <public_key> <private_key>
composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition:2.4.3-p3 ./
Enter valid Magento keys for <public_key> and <private_key>
outside container
Inside ./
sudo rsync -azvp __project/ ./ --remove-source-files
sudo rm '__project' -rf
Inside ./
docker-compose up -d
Shortcut
bin/local up
bin/local cli
bin/magento setup:install --admin-firstname Admin --admin-lastname User --admin-email [email protected] --admin-user admin --admin-password test123 --base-url http://magento2.docker/ --base-url-secure https://magento2.docker/ --backend-frontname xpanel --db-host db --db-name magento2 --db-user magento2 --db-password magento2 --language en_GB --currency GBP --timezone UTC --use-rewrites 1 --session-save files --use-secure 1 --use-secure-admin 1 --elasticsearch-host elasticsearch --elasticsearch-port 9200
2.4.6 opensearch
bin/magento setup:install --admin-firstname Admin --admin-lastname User --admin-email [email protected] --admin-user admin --admin-password test123 --base-url http://magento2.docker/ --base-url-secure https://magento2.docker/ --backend-frontname xpanel --db-host db --db-name magento2 --db-user magento2 --db-password magento2 --language en_GB --currency GBP --timezone UTC --use-rewrites 1 --session-save files --use-secure 1 --use-secure-admin 1 --opensearch-host opensearch --opensearch-port 9200
bin/magento module:disable "Magento_TwoFactorAuth"
Outside shell container
bin/local magento module:disable Magento_TwoFactorAuth
2.4.6
bin/magento module:disable Magento_TwoFactorAuth Magento_AdminAdobeImsTwoFactorAuth
Outside shell container
bin/local magento module:disable Magento_TwoFactorAuth Magento_AdminAdobeImsTwoFactorAuth
https://magento2.docker/
https://magento2.docker/xpanel
admin / test123
SMTP extension config
- host:
mailhog
- port:
1025
- protocol:
none
- authentication:
plain
- username/password:
[blank]
In ./
outside container
bin/local
Arguments:
up Create and start containers
down Destroy containers
init Destroy, re-create and start containers and volumes
pull Pull latest images
stop Stop containers
start Start containers
restart Restart containers
build Deployment process
cachedev Development cache settings
cacheflush Flush cache
cacheon All cache on
cacheoff All cache off
cli Connect to bash
cron Run cron
db Connect to db
di Run di compile
magento Run Magento command
theme Run theme compilation
upgrade Run upgrade command
composer Run composer command
create Run create project command
Example
bin/local composer require dominicwatts/faker dominicwatts/magentodevelopbundle
bin/local cacheflush
bin/local upgrade
bin/local magento
If you have error running local try dos2unix
sudo apt-get install dos2unix
dos2unix ./bin/local