Watch 1 Star 1 Fork 0

jtoman / yii-dockerDockerBSD-3-Clause

Join us
Explore and code with more than 5 million developers,Free private repositories !:)
Sign up
yii-docker php7.4 apache2 spread retract

Clone or download
Loading...
README.md

Yii 3.x PHP Docker Image


Stable Build Status Development pipeline status

This is the repo of the official Yii 3.x Framework image on DockerHub 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 3.x 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.

Features

  • built from official Docker images
  • all core-framework tests pass
  • includes Xdebug (not loaded by default)
  • ready for handling client-side packages
  • bash auto-completion

Available versions for yiisoftware/yii-php

7.4-apache,
7.4-fpm

Inlcudes npm.

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

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.

If you are using macOS, you can fill xdebug.remote_host with 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

Documentation

More information can be found in the docs folder.

Comments ( 0 )

Sign in for post a comment

Docker
1
https://gitee.com/china_earth_Galaxy/yii-docker.git
git@gitee.com:china_earth_Galaxy/yii-docker.git
china_earth_Galaxy
yii-docker
yii-docker
master

Help Search

205735 778617b6 1899542 205747 347fc4a1 1899542