it seems the following docker image works better for magento 2 local development
To Clean up docker image, volume, etc (Optional)
# docker system prune
# stop all containers:
# docker kill $(docker ps -q)
# remove all containers
# docker rm $(docker ps -a -q)
# remove all docker images
# docker rmi $(docker images -q)
# remove all volumes
#docker volume rm $(docker volume ls -f dangling=true -q)
- git clone https://github.com/markoshust/magento2-docker.git
- cd magento2-docker
- docker-compose run --rm setup
after this command the DB setup would have completed and will have just the DB Image
- Un comment docker-compose.override
- mv docker-compose.override.yml.dist docker-compose.override.yml
- docker-compose up -d app
This will create another 2 docker container, so we should have 3 containers running.
- cp CONTAINER ID:/var/www/html ./ . ( this is the container id of magento2docker_phpfpm_1)
- http://m2.localhost:8000/index.php
- Admin : http://m2.localhost:8000/index.php/admin_16wb2m/
Sample HelloWorld Module
Follow the steps in