Docker image tailored to run Yii2 applications
5.0K
Docker image tailored to run Yii2
Docker hub
https://hub.docker.com/r/touch4it/yii2-php-fpm-nginx
Github repository
https://github.com/touch4it/docker-php7
This repository is a source code for following Docker images tagged by PHP version:
version: '2'
services:
drupal:
image: touch4it/yii2-php-fpm-nginx
expose:
- 80
links:
- db:db
depends_on:
- db
db:
image: mariadb:10.3
environment:
MYSQL_ROOT_PASSWORD: yii
MYSQL_DATABASE: yii
MYSQL_USER: yii
MYSQL_PASSWORD: yii
expose:
- 3306
version: '2'
services:
drupal:
ports:
- 8080:80
volumes:
- ./app:/var/www/html
- ./cron:/etc/cron
db:
volumes:
- ./db/init:/docker-entrypoint-initdb.d
- ./db/data:/var/lib/mysql
- ./db/dump:/dump
Use docker-compose up command to start your development environment.
You can build production ready image with Dockerfile like this:
FROM touch4it/docker-php7:php7
ADD . /var/www/html
This work is based on official Docker Hub php images. You can use docker-php-ext-install to add new extensions. More information can be found https://hub.docker.com/_/php/
You can add an ini file into $PHP_INI_DIR/conf.d directory
Content type
Image
Digest
Size
175.6 MB
Last updated
over 4 years ago
docker pull touch4it/yii2-php-fpm-nginx