Feature/docker support (#157)

* added Docker support

* updated Docker docs
This commit is contained in:
Tobias Munk 2018-02-06 22:07:24 +01:00 committed by Alexander Makarov
parent 7942ecffee
commit cfe16a52d7
2 changed files with 32 additions and 0 deletions

View File

@ -82,6 +82,29 @@ http://localhost/basic/web/
~~~
### Install with Docker
Update your vendor packages
docker-compose run --rm php composer update --prefer-dist
Run the installation triggers (creating cookie validation code)
docker-compose run --rm php composer install
Start the container
docker-compose up -d
You can then access the application through the following URL:
http://127.0.0.1:8000
**NOTES:**
- Minimum required Docker engine version `17.04` for development (see [Performance tuning for volume mounts](https://docs.docker.com/docker-for-mac/osxfs-caching/))
- The default configuration uses a host-volume in your home directory `.docker-composer` for composer caches
CONFIGURATION
-------------

9
docker-compose.yml Normal file
View File

@ -0,0 +1,9 @@
version: '2'
services:
php:
image: yiisoftware/yii2-php:7.1-apache
volumes:
- ~/.composer-docker/cache:/root/.composer/cache:delegated
- ./:/app:delegated
ports:
- '8000:80'