This is a Docker environment for Magento2.
Compatible with Magento 2.2.1.
This image contains:
- Ubuntu 16.04 LTS
- NGINX
- PHP7.1
- Nano editor
- MC filemanager
- Optimal Settings For Magento
- docker-compose what installs MySQL, Redish and PHPMyAdmin (optional)
- Copy these files to your
Magento2 Project Root
- Fill your authentication data in
auth.json
- Check data in
env
file and modify them whatever you want. - Run
docker-compose up web
command from your root (wait for ready) - Enter the container
docker exec -it {YOUR_CONTAINER_NAME} bash
. (You can list your container the folllowing commanddocker ps
.) - Run
bin/install-magento
- Now You can reach Magento on http://localhost:8080
Add next row to your host file. You can modify the domain, but in this case modify in env file too.
127.0.0.1 magento.local
Run next command from root:
docker-compose up phpmyadmin
If ready then you can reach PhpMyAdmin at http://localhost::8580
Enter the container docker exec -it {YOUR_CONTAINER_NAME} bash
.
Now you can run commands. For example: php bin/magento
- app
- dev
- pub/media
- dev/tests/unit/phpunit.xml.dist
- composer.json
- composer.lock