# yii2-docker **Repository Path**: lvzmen_github/yii2-docker ## Basic Information - **Project Name**: yii2-docker - **Description**: No description available - **Primary Language**: Unknown - **License**: BSD-3-Clause - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-11-09 - **Last Updated**: 2021-11-09 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README

Yii2 PHP Docker Image


[![Build Status](https://github.com/yiisoft/yii2-docker/actions/workflows/docker-image.yml/badge.svg)](https://github.com/yiisoft/yii2-docker/actions/workflows/docker-image.yml) This is the repo of the official [Yii 2.0 Framework](http://www.yiiframework.com/) image on [DockerHub](https://hub.docker.com/r/yiisoftware/yii2-php/) for PHP. ## About These Docker images are built on top of the official PHP Docker image, they contain additional PHP extensions required to run Yii 2.0 framework, but no code of the framework itself. The `Dockerfile`(s) of this repository are designed to build from different PHP-versions by using *build arguments*. ### Available versions for `yiisoftware/yii2-php` ``` 8.0-apache, 8.0-fpm 7.4-apache, 7.4-fpm ``` #### Deprecated or EOL versions ``` 7.3-apache, 7.3-fpm 7.2-apache, 7.1-apache, 7.0-apache, 5.6-apache 7.2-fpm, 7.1-fpm, 7.0-fpm, 5.6-fpm ``` ## Setup cp .env-dist .env Adjust the versions in `.env` if you want to build a specific version. > **Note:** Please make sure to use a matching combination of `DOCKERFILE_FLAVOUR` and `PHP_BASE_IMAGE_VERSION` ## Configuration - `PHP_ENABLE_XDEBUG` whether to load an enable Xdebug, defaults to `0` (false) - `PHP_USER_ID` (Debian only) user ID, when running commands as webserver (`www-data`), see also [#15](https://github.com/yiisoft/yii2-docker/issues/15) ## Building docker-compose build ## Testing docker-compose run --rm php php /tests/requirements.php ### Xdebug To enable Xdebug, set `PHP_ENABLE_XDEBUG=1` in .env file Xdebug is configured to call ip `xdebug.remote_host` on `9005` port (not use standard port to avoid conflicts), so you have to configure your IDE to receive connections from that ip. ## Documentation More information can be found in the [docs](/docs) folder. ## FAQ - We do not officially support Alpine images, due to numerous issues with PHP requirements and because framework tests are not passing. - Depending on the (Debian) base-image (usually PHP <7.4) you might need to set `X_LEGACY_GD_LIB=1` - test