Docker containers for Magento 2.4.x development including :
- Ubuntu 22.04
- PHP 8.2
- Apache 2.4
- MYSQL 8
- Varnish 7 FPC
- RabbitMQ 3.x
- PhpMyAdmin
- memcached
- ELASTIC search 7.x
- REDIS Session, System, FPC
- Scaleable php-apache service
-
EDIT .env - add your Magento authentication keys
-
docker-compose build
-
docker-compose up -d
-
Install sample data, note sample data will fail until php has initialised composer, allow 60 seconds after start - ignore any errors
docker-compose exec -u magento php-apache install-sampledata
-
Install Magento
docker-compose exec -u magento php-apache install-magento
-
Disable 2FA for testing
docker exec -i -t --user magento magento2_php-apache_1 ./bin/magento module:disable Magento_AdminAdobeImsTwoFactorAuth
docker-compose exec -u magento php-apache bin/magento module:disable Magento_TwoFactorAuth
-
Frontend http://magento2.dev.com
-
CLI
docker-compose exec -u magento php-apache bash
to fix layout issues with demo data : docker-compose exec -u magento php-apache cp /var/www/dev/magento2/vendor/magento/module-cms-sample-data/fixtures/styles.css /var/www/dev/magento2/pub/media/
https://blog.gaiterjones.com/docker-magento-2-development-deployment-php7-apache2-4-redis-varnish-scaleable/ for further deployment instructions.