These Docker images are built on top of the official PHP Docker image, they contain additional PHP extensions required to run Yii 3.x framework, but no code of the framework itself.
Dockerfile(s) of this repository are designed to build from different PHP-versions by using build arguments.
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
PHP_ENABLE_XDEBUGwhether to load an enable Xdebug, defaults to
PHP_USER_ID(Debian only) user ID, when running commands as webserver (
www-data), see also #15
docker-compose run --rm php php /tests/requirements.php
To enable Xdebug, set
PHP_ENABLE_XDEBUG=1 in .env file
Xdebug is configured to call ip
9005 port (not use standard port to avoid conflicts),
so you have to configure your IDE to receive connections from that ip.
If you are using macOS, you can fill
host.docker.internal, due to a network limitation on mac (https://docs.docker.com/docker-for-mac/networking/#port-mapping)
### (macOS) configuration xdebug.remote_host=host.docker.internal
More information can be found in the docs folder.