PHP 7.x - Apache2 with extensions for Yii2.
50K+
PHP 7.1 - Apache with required extensions for Yii2 (MySql PDO, mcrypt, zip, etc.)
Checkout github repo for files: https://github.com/floatschedule/docker-php7-yii2
Designed as a base image. You must create your own Yii2 project.
To test local image, you can use:
docker-compose up
create a docker-compose.override.yml file to use your own values, e.g., to test a local tag of this image.
check: http://localhost:82 (Uses port 82 to avoid conflicts. Update docker-compose.yml as desired.)
Or use docker run statement:
docker run -d -p 82:80 \
-v $(pwd)/../www/html:/var/www/html \
-v $(pwd)/php/etc-php/conf.d:/usr/local/etc/php/conf.d \
-v $(pwd)/apache2/sites-enabled:/etc/apache2/sites-enabled \
--name php7 floatapp/php7-yii2:{TAG}
Should run the Yii2 "basic" vanilla app. No db or other Yii2 config has been set, however image is MySQL-PDO ready. Include sample docker-compose.db.yml file or similar to add db.
Either by using docker-compose exec and use composer.phar inside container or if you have a similar version of php, you can try running from your host. Run from inside the "html" directory.
Update port, hostname, etc. as needed in docker-compose.yml, apache2, php, etc.
Apache sites config are in the apache2/sites-enabled directory.
You should be able to pick up Yii2 install from this step:
http://www.yiiframework.com/doc-2.0/guide-start-installation.html#configuring-web-servers
Content type
Image
Digest
Size
609.2 MB
Last updated
almost 6 years ago
docker pull floatapp/php7-yii2