yii2-docker

适合 Yii 的官方 Docker 映像。「Official Docker images suitable for Yii」

Github星跟踪图

Build Status

This is the repo of the official Yii 2.0 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 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

The following images are built on a weekly basis for arm64 and amd64. For regular commits on master we only build images for amd64 suffixed with -latest/-latest-min.

Minimal images

8.2-apache-min, 8.2-fpm-min, 8.2-fpm-nginx-min
8.1-apache-min, 8.1-fpm-min, 8.1-fpm-nginx-min
8.0-apache-min, 8.0-fpm-min, 8.0-fpm-nginx-min

Development images

8.2-apache, 8.2-fpm, 8.2-fpm-nginx
8.1-apache, 8.1-fpm, 8.1-fpm-nginx
8.0-apache, 8.0-fpm, 8.0-fpm-nginx

Deprecated or EOL versions

7.4-*
7.3-*
7.2-*
7.1-*
7.0-*
5.6-*

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) not available in -min images
  • 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.

Documentation

More information can be found in the 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

主要指标

概览
名称与所有者yiisoft/yii2-docker
主编程语言PHP
编程语言Shell (语言数: 3)
平台
许可证BSD 3-Clause "New" or "Revised" License
所有者活动
创建于2017-03-08 11:14:09
推送于2025-02-11 12:31:20
最后一次提交2025-02-11 13:31:20
发布数12
最新版本名称24.3.0 (发布于 )
第一版名称17.12.0 (发布于 2017-12-18 13:28:08)
用户参与
星数392
关注者数41
派生数202
提交数295
已启用问题?
问题数108
打开的问题数7
拉请求数53
打开的拉请求数0
关闭的拉请求数14
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?