├── .editorconfig ├── .github ├── CODE_OF_CONDUCT.md └── CONTRIBUTING.md ├── .travis.yml ├── CHANGELOG.md ├── LICENSE ├── Makefile ├── README.md ├── docker ├── 7.0-apache.Dockerfile ├── 7.0-cgi.Dockerfile ├── 7.0-cli.Dockerfile ├── 7.0-lighttpd.Dockerfile ├── 7.0-litespeed.Dockerfile ├── 7.0-nginx.Dockerfile ├── 7.0.Dockerfile ├── 7.1-apache.Dockerfile ├── 7.1-cgi.Dockerfile ├── 7.1-cli.Dockerfile ├── 7.1-lighttpd.Dockerfile ├── 7.1-litespeed.Dockerfile ├── 7.1-nginx.Dockerfile ├── 7.1.Dockerfile ├── 7.2-apache.Dockerfile ├── 7.2-cgi.Dockerfile ├── 7.2-cli.Dockerfile ├── 7.2-lighttpd.Dockerfile ├── 7.2-litespeed.Dockerfile ├── 7.2-nginx.Dockerfile ├── 7.2.Dockerfile ├── 7.3-apache.Dockerfile ├── 7.3-cgi.Dockerfile ├── 7.3-cli.Dockerfile ├── 7.3-lighttpd.Dockerfile ├── 7.3-litespeed.Dockerfile ├── 7.3-nginx.Dockerfile ├── 7.3.Dockerfile ├── 7.4-apache.Dockerfile ├── 7.4-cgi.Dockerfile ├── 7.4-cli.Dockerfile ├── 7.4-lighttpd.Dockerfile ├── 7.4-litespeed.Dockerfile ├── 7.4-nginx.Dockerfile ├── 7.4.Dockerfile ├── hooks │ ├── build │ └── post_push └── tags │ ├── apache │ ├── etc │ │ └── service │ │ │ └── apache │ │ │ └── run │ └── sbin │ │ ├── runit-wrapper │ │ └── runsvdir-start │ ├── lighttpd │ ├── etc │ │ ├── lighttpd │ │ │ └── example.conf │ │ └── service │ │ │ ├── lighttpd │ │ │ └── run │ │ │ └── php-fpm │ │ │ └── run │ ├── sbin │ │ ├── runit-wrapper │ │ └── runsvdir-start │ └── var │ │ └── www │ │ └── localhost │ │ └── htdocs │ │ └── index.php │ ├── litespeed │ ├── etc │ │ └── service │ │ │ └── lsws │ │ │ └── run │ └── sbin │ │ ├── runit-wrapper │ │ └── runsvdir-start │ └── nginx │ ├── etc │ ├── nginx │ │ └── conf.d │ │ │ └── default.conf │ └── service │ │ ├── nginx │ │ └── run │ │ └── php-fpm │ │ └── run │ ├── sbin │ ├── runit-wrapper │ └── runsvdir-start │ └── var │ └── www │ └── html │ └── index.php └── tests ├── 7.0-apache ├── goss.yaml └── test ├── 7.0-cgi ├── goss.yaml └── test ├── 7.0-composer ├── Dockerfile ├── goss.yaml └── test ├── 7.0-extensions ├── Dockerfile ├── goss.yaml └── test ├── 7.0-litespeed ├── goss.yaml └── test ├── 7.0-nginx ├── goss.yaml └── test ├── 7.1-apache ├── goss.yaml └── test ├── 7.1-cgi ├── goss.yaml └── test ├── 7.1-composer ├── Dockerfile ├── goss.yaml └── test ├── 7.1-extensions ├── Dockerfile ├── goss.yaml └── test ├── 7.1-iconv ├── Dockerfile ├── goss.yaml ├── iconv.php └── test ├── 7.1-litespeed ├── goss.yaml └── test ├── 7.1-nginx ├── goss.yaml └── test ├── 7.1-phpunit ├── Dockerfile ├── goss.yaml └── test ├── 7.2-apache ├── goss.yaml └── test ├── 7.2-argon ├── Dockerfile ├── argon.php ├── goss.yaml └── test ├── 7.2-cgi ├── goss.yaml └── test ├── 7.2-composer ├── Dockerfile ├── goss.yaml └── test ├── 7.2-extensions ├── Dockerfile ├── goss.yaml └── test ├── 7.2-litespeed ├── goss.yaml └── test ├── 7.2-nginx ├── goss.yaml └── test ├── 7.2-phpunit ├── Dockerfile ├── goss.yaml └── test ├── 7.3-apache ├── goss.yaml └── test ├── 7.3-argon ├── Dockerfile ├── argon.php ├── goss.yaml └── test ├── 7.3-cgi ├── goss.yaml └── test ├── 7.3-composer ├── Dockerfile ├── goss.yaml └── test ├── 7.3-extensions ├── Dockerfile ├── goss.yaml └── test ├── 7.3-litespeed ├── goss.yaml └── test ├── 7.3-nginx ├── goss.yaml └── test ├── 7.3-phpunit ├── Dockerfile ├── goss.yaml └── test └── test /.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | 14 | [{docker/hooks/build,docker/hooks/post_push}] 15 | indent_style = space 16 | indent_size = 4 17 | 18 | [docker/*.Dockerfile] 19 | indent_style = space 20 | indent_size = 4 21 | 22 | [*.yml] 23 | indent_style = space 24 | indent_size = 2 25 | 26 | [Makefile] 27 | indent_style = space 28 | indent_size = 2 29 | trim_trailing_whitespace = false 30 | 31 | [APKBUILD] 32 | indent_style = space 33 | indent_size = 2 34 | 35 | [*.patch] 36 | trim_trailing_whitespace = unset 37 | end_of_line = unset 38 | insert_final_newline = unset 39 | -------------------------------------------------------------------------------- /.github/CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Code of conduct 2 | 3 | This project is part of the [PHP.earth](https://php.earth) group which follows a 4 | [code of conduct](https://conduct.php.earth) to guarantee a welcoming, safe, 5 | inclusive, and harassment-free environment for anyone. 6 | -------------------------------------------------------------------------------- /.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing guide 2 | 3 | Contributions are most welcome. Below is described procedure for contributing to 4 | this repository. 5 | 6 | * Fork this repository over GitHub 7 | * Create a separate branch, for instance `patch-1` so you will not need to rebase 8 | your fork if your master branch is merged 9 | 10 | ```bash 11 | git clone git@github.com:your_username/docker-php 12 | cd docker-php 13 | git checkout -b patch-1 14 | ``` 15 | * Make changes, commit them and push to your fork 16 | 17 | ```bash 18 | git add . 19 | git commit -m "Fix bug" 20 | git push origin patch-1 21 | ``` 22 | * Open a pull request 23 | 24 | ## Style guide 25 | 26 | * This repository uses [Markdown](https://daringfireball.net/projects/markdown/) 27 | syntax and follows 28 | [cirosantilli/markdown-style-guide](http://www.cirosantilli.com/markdown-style-guide/) 29 | style guide. 30 | 31 | ## GitHub issues labels 32 | 33 | Labels are used to organize issues and pull requests into manageable categories. 34 | The following labels are used: 35 | 36 | * **bug** - Attached when bug is reported. 37 | * **duplicate** - Attached when the same issue or pull request already exists. 38 | * **enhancement** - Attached when creating a new feature. 39 | * **invalid** - Attached when the issue or pull request does not correspond with 40 | scope of the repository or because of some inconsistency. 41 | * **question** - Attached for questions or discussions. 42 | * **wontfix** - Attached when decided that issue will not be fixed. 43 | 44 | ## Release process 45 | 46 | *(For repository maintainers)* 47 | 48 | This repository follows [semantic versioning](http://semver.org/). When source 49 | code changes, new features are implemented, or PHP version gets upgraded, a new 50 | version (e.g. 1.x.y) is released by the following release process: 51 | 52 | * **1. Tests** 53 | 54 | Tests are run with [Goss](https://github.com/aelsabbahy/goss): 55 | 56 | ```bash 57 | make test [t=" ..."] 58 | ``` 59 | 60 | * **2. Update changelog** 61 | 62 | Create an entry in [CHANGELOG.md](/CHANGELOG.md) describing all the changes 63 | from previous release. 64 | 65 | * **3. Docker images** 66 | 67 | Build and push Docker images to [Docker Hub](https://hub.docker.com/r/phpearth/php/). 68 | 69 | ```bash 70 | make build-and-push 71 | ``` 72 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: required 2 | 3 | services: 4 | - docker 5 | 6 | before_install: 7 | # install goss 8 | - curl -L https://goss.rocks/install | sudo sh 9 | 10 | script: 11 | - cd tests && ./test 12 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. This project 4 | [keeps a CHANGELOG](http://keepachangelog.com/) based on the time changes. 5 | 6 | ## 2019-05-10 7 | 8 | * PHP 7.4.0-dev 9 | 10 | ## 2018-12-06 11 | 12 | * PHP 7.3.0 13 | 14 | ## 2018-10-24 15 | 16 | * PHP 7.3.0RC4 17 | * PHP 7.2.11 18 | * PHP 7.1.23 19 | 20 | ## 2018-09-25 21 | 22 | * Alpine 3.8.1 base image update 23 | 24 | ## 2018-09-13 25 | 26 | * PHP 7.3.0RC1 27 | * PHP 7.2.10 28 | * PHP 7.1.22 29 | * PHP 7.0.32 30 | 31 | ## 2018-09-06 32 | 33 | * PHP 7.3.0beta3 34 | * PHP 7.2.9 35 | * PHP 7.1.21 36 | 37 | ## 2018-07-21 38 | 39 | * Alpine 3.8 40 | * PHP 7.0.31 41 | * PHP 7.1.19 42 | * PHP 7.2.8 43 | * PHP 7.3.0 alpha 4 44 | 45 | ## 2018-06-22 46 | 47 | * PHP 7.3 images 48 | * PHP 7.2.7 49 | 50 | ## 2018-06-21 51 | 52 | * Repository moved to github.com/phpearth 53 | * PHP 7.2.4 54 | * PHP 7.1.16 55 | * PHP 7.0.29 56 | * OpenLiteSpeed 1.5.0 RC 2 r101 57 | * PHP 7.2.3 r101 58 | * PHP 7.2.3 59 | * PHP 7.0.28 60 | * PHP 7.1.15 61 | * OpenLiteSpeed 1.5.0 RC2 62 | * OpenLiteSpeed 1.4.29 63 | * PHP 7.1.14 64 | * PHP 7.2.2 65 | 66 | ## 2018-02-01 67 | 68 | * PHP 7.0.27 69 | * PHP 7.1.13 70 | * PHP 7.2.1 71 | 72 | ## 2018-01-03 73 | 74 | * Alpine 3.7 75 | * PHP 7.2.0 stable 76 | * Fix OpenLiteSpeed images to run the server properly 77 | * Expose important web server ports in Docker images 78 | * New Lighttpd web server images 79 | 80 | ## 2017-11-22 81 | 82 | * PHP 7.2.0RC6 83 | * PHP 7.1.12 84 | * PHP 7.0.26 85 | * OpenLiteSpeed 1.4.28 86 | 87 | ## 2017-10-29 88 | 89 | * Add phar extension to all Docker images except minimal ones. 90 | * Use PHP.earth Alpine packages with custom compiler optimization flags. 91 | 92 | ## 2017-10-25 93 | 94 | * PHP 7.2.0RC5 95 | * PHP 7.1.11 96 | * PHP 7.0.25 97 | * New images with only PHP CLI from PHP.earth Alpine repos 98 | * Alpine repository moved to its own [location](https://github.com/php-earth/alpine) 99 | and repository folder structure refactored 100 | 101 | ## 2017-10-01 102 | 103 | * Refactored PHP APKBUILD files 104 | * PHPUnit 6.3.1 105 | * Fixed bug with PHP bundled libgd not working with provided GNU libiconv package: 106 | ``` 107 | PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/7.1/modules/gd.so' - Error relocating /usr/lib/php/7.1/modules/gd.so: libiconv: symbol not found in Unknown on line ) 108 | ``` 109 | * PHP 7.0.24 110 | * PHP 7.1.10 111 | * PHP 7.2.0RC3 112 | * Swoole 1.9.21 113 | * PECL Libsodium 2.0.8 114 | * PECL Redis 3.1.4 115 | * [Apache bug fixed](https://github.com/php-earth/docker-php/issues/4) 116 | 117 | ## 2017-09-20 118 | 119 | * Swoole 1.9.20 120 | * OpenLiteSpeed 1.4.27 121 | * PHP 7.2.0 RC2 122 | * PHP 7.1.9 123 | * PHP 7.0.23 124 | * MongoDB 1.3.0 125 | * Composer 1.5.2 126 | * [iconv bug fix](https://github.com/php-earth/docker-php/issues/3) 127 | 128 | ## 2017-08-14 129 | 130 | * Refactor and fix multiple issues with Alpine repository packages 131 | * Swoole 1.9.18 132 | * PHPUnit 6.3.0 133 | * Composer 1.5.1 134 | * PHP 7.2.0 beta 2 135 | * PHP 7.1.8 136 | * PHP 7.0.22 137 | * New tests 138 | 139 | ## 2017-07-06 140 | 141 | * Debian based images removed in favor of Alpine for smallest possible sizes 142 | * Introducing PHP.earth Alpine repository 143 | 144 | ## 2017-06-20 145 | 146 | * Apache HTTP Server 147 | * PHP CGI 148 | * Refactored and stabilized Docker tags 149 | * Improved documentation 150 | * Tests 151 | 152 | ## 2017-06-12 153 | 154 | * Repository location refactored 155 | * PEAR removed 156 | * PHP 7.2.0alpha1 157 | * Composer installation script with optional prestissimo plugin 158 | 159 | ## 2017-06-03 160 | 161 | * OpenLiteSpeed 1.4.26 162 | * New tag added for OpenLiteSpeed on Alpine 163 | * Use `-O3` optimization level for GCC when compiling PHP 164 | * Move intl, xsl and gettext PHP extensions to installation script 165 | * Optimize Debian images size 166 | 167 | ## 2017-05-29 168 | 169 | * Improved script for downloading PHP extensions 170 | * Fixed minor bug in script for downloading Composer 171 | * Removed bash from Alpine Docker images 172 | * Refactor Dockerfiles 173 | * PHP GD extension moved to installation script 174 | 175 | ## 2017-05-27 176 | 177 | * Refactored Docker tags 178 | * Upgraded to Alpine 3.6 base images 179 | * Installation script for Composer and Prestissimo plugin for parallel downloading 180 | of PHP packages 181 | 182 | ## 2017-05-13 183 | 184 | * Repository refactored 185 | * PHP 7.1.5 186 | 187 | ## 2017-04-13 188 | 189 | * PHP 7.1.4 190 | 191 | ## 2017-04-01 192 | 193 | * Xdebug extension 194 | 195 | ## 2017-04-01 196 | 197 | * Fixed OpenLiteSpeed installation dependencies 198 | 199 | ## 2017-04-01 200 | 201 | * Added support for multiple PHP extensions 202 | * Documentation improvements 203 | * Composer removed from base images 204 | 205 | ## 2017-03-31 206 | 207 | * xmlrpc support 208 | * postgresql and pdo_pgsql support 209 | * gmp support 210 | * recode support 211 | 212 | ## 2017-03-28 213 | 214 | * The imagick PECL extension support 215 | 216 | ## 2017-03-27 217 | 218 | * The memcached extension support 219 | 220 | ## 2017-03-21 221 | 222 | * Tidy extension support 223 | * WDDX extension support 224 | 225 | ## 2017-03-20 226 | 227 | * Initial release with PHP 7.1.3 228 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016-present PHP.earth 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is furnished 8 | to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .RECIPEPREFIX := $(.RECIPEPREFIX) 2 | .DEFAULT_GOAL := help 3 | .PHONY: * 4 | 5 | help: 6 | @echo "\033[33mUsage:\033[0m\n make [target] [arg=\"val\"...]\n\n\033[33mTargets:\033[0m" 7 | @grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[32m%-15s\033[0m %s\n", $$1, $$2}' 8 | 9 | test: ## Run all tests; Usage: make test [t=" ..."] 10 | @cd tests; \ 11 | ./test "$(t)" 12 | 13 | build: ## Build image. Usage: make build TAG="7.0-cli" 14 | @docker build --no-cache --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` --build-arg VCS_REF=`git rev-parse --short HEAD` -t phpearth/php:$(TAG) -f docker/$(TAG).Dockerfile docker 15 | 16 | build-70: ## Build PHP 7.0 images 17 | make build TAG="7.0" 18 | make build TAG="7.0-apache" 19 | make build TAG="7.0-cgi" 20 | make build TAG="7.0-cli" 21 | make build TAG="7.0-lighttpd" 22 | make build TAG="7.0-litespeed" 23 | make build TAG="7.0-nginx" 24 | 25 | build-71: ## Build PHP 7.1 images 26 | make build TAG="7.1" 27 | make build TAG="7.1-apache" 28 | make build TAG="7.1-cgi" 29 | make build TAG="7.1-cli" 30 | make build TAG="7.1-lighttpd" 31 | make build TAG="7.1-litespeed" 32 | make build TAG="7.1-nginx" 33 | 34 | build-72: ## Build PHP 7.2 images 35 | make build TAG="7.2" 36 | make build TAG="7.2-apache" 37 | make build TAG="7.2-cgi" 38 | make build TAG="7.2-cli" 39 | make build TAG="7.2-lighttpd" 40 | make build TAG="7.2-litespeed" 41 | make build TAG="7.2-nginx" 42 | 43 | build-73: ## Build PHP 7.3 images 44 | make build TAG="7.3" 45 | make build TAG="7.3-apache" 46 | make build TAG="7.3-cgi" 47 | make build TAG="7.3-cli" 48 | make build TAG="7.3-lighttpd" 49 | make build TAG="7.3-litespeed" 50 | make build TAG="7.3-nginx" 51 | 52 | build-all: ## Build all images 53 | make build-70 54 | make build-71 55 | make build-72 56 | make build-73 57 | 58 | push-70: ## Push built PHP 7.0 images to Docker Hub 59 | @docker push phpearth/php:7.0 60 | @docker push phpearth/php:7.0-apache 61 | @docker push phpearth/php:7.0-cgi 62 | @docker push phpearth/php:7.0-cli 63 | @docker push phpearth/php:7.0-lighttpd 64 | @docker push phpearth/php:7.0-litespeed 65 | @docker push phpearth/php:7.0-nginx 66 | 67 | push-71: ## Push built PHP 7.1 images to Docker Hub 68 | @docker push phpearth/php:7.1 69 | @docker push phpearth/php:7.1-apache 70 | @docker push phpearth/php:7.1-cgi 71 | @docker push phpearth/php:7.1-cli 72 | @docker push phpearth/php:7.1-lighttpd 73 | @docker push phpearth/php:7.1-litespeed 74 | @docker push phpearth/php:7.1-nginx 75 | 76 | push-72: ## Push built PHP 7.2 images to Docker Hub 77 | @docker push phpearth/php:7.2 78 | @docker push phpearth/php:7.2-apache 79 | @docker push phpearth/php:7.2-cgi 80 | @docker push phpearth/php:7.2-cli 81 | @docker push phpearth/php:7.2-lighttpd 82 | @docker push phpearth/php:7.2-litespeed 83 | @docker push phpearth/php:7.2-nginx 84 | 85 | push-73: ## Push built PHP 7.3 images to Docker Hub 86 | @docker push phpearth/php:7.3 87 | @docker push phpearth/php:7.3-apache 88 | @docker push phpearth/php:7.3-cgi 89 | @docker push phpearth/php:7.3-cli 90 | @docker push phpearth/php:7.3-lighttpd 91 | @docker push phpearth/php:7.3-litespeed 92 | @docker push phpearth/php:7.3-nginx 93 | @docker tag phpearth/php:7.3 phpearth/php:latest 94 | @docker push phpearth/php:latest 95 | 96 | push-all: ## Push all built images to Docker Hub 97 | make push-70 98 | make push-71 99 | make push-72 100 | make push-73 101 | 102 | build-and-push-70: ## Build and push PHP 7.0 images to Docker Hub 103 | make build-70 104 | make push-70 105 | 106 | build-and-push-71: ## Build and push PHP 7.1 images to Docker Hub 107 | make build-71 108 | make push-71 109 | 110 | build-and-push-72: ## Build and push PHP 7.2 images to Docker Hub 111 | make build-72 112 | make push-72 113 | 114 | build-and-push-73: ## Build and push PHP 7.3 images to Docker Hub 115 | make build-73 116 | make push-73 117 | 118 | build-and-push: ## Build all images and push them to Docker Hub 119 | make build-all 120 | make push-all 121 | 122 | clean: ## Clean all containers and images on the system 123 | -@docker ps -a -q | xargs docker rm -f 124 | -@docker images -q | xargs docker rmi -f 125 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Docker for PHP developers 2 | 3 | [![Build Status](https://img.shields.io/travis/phpearth/docker-php/master.svg?style=plastic)](https://travis-ci.org/phpearth/docker-php) [![Docker Automated build](https://img.shields.io/docker/automated/phpearth/php.svg?style=plastic)](https://hub.docker.com/r/phpearth/php/) [![MIT License](https://img.shields.io/github/license/phpearth/docker-php.svg?style=plastic "MIT License")](https://github.com/phpearth/docker-php/blob/master/LICENSE) 4 | 5 | Carefully crafted Docker images for PHP developers with PHP 7.3, PHP 7.2, PHP 7.1, PHP 7.0, Nginx, OpenLiteSpeed, Apache HTTP Server, and Lighttpd. 6 | 7 | ![PHP.earth](https://cdn.rawgit.com/phpearth/logo/master/svg/indigo_300x300.svg "PHP.earth") 8 | 9 | * Fast and simple PHP extensions installation 10 | * Optional Composer installation 11 | * Optional PHPUnit installation 12 | * [runit](http://smarden.org/runit/) for running multiple services without overhead 13 | * Alpine base image with [PHP.earth PHP repositories](https://docs.php.earth/linux/alpine) 14 | * Optimized Docker image sizes 15 | * Multiple PHP versions 16 | 17 | ## Documentation 18 | 19 | Documentation with Docker and PHP recipes is available on [PHP.earth](https://docs.php.earth/docker). 20 | 21 | ## Docker tags 22 | 23 | The following list contains all current Docker tags and what is included in each. 24 | 25 | | System | Docker Tag | Features | Size | 26 | | ------ | ---------- | -------- | ---- | 27 | | **PHP 7.4.0alpha1**@Alpine 3.9.4 | [`7.4`](https://github.com/phpearth/docker-php/tree/master/docker/7.4.Dockerfile) | Small PHP CLI | [![](https://images.microbadger.com/badges/image/phpearth/php:7.4.svg)](https://microbadger.com/images/phpearth/php:7.4 "Image size") | 28 | | | [`7.4-cli`](https://github.com/phpearth/docker-php/tree/master/docker/7.4-cli.Dockerfile) | PHP CLI | [![](https://images.microbadger.com/badges/image/phpearth/php:7.4-cli.svg)](https://microbadger.com/images/phpearth/php:7.4-cli "Image size") | 29 | | | [`7.4-lighttpd`](https://github.com/phpearth/docker-php/tree/master/docker/7.4-lighttpd.Dockerfile) | Lighttpd 1.4.52 | [![](https://images.microbadger.com/badges/image/phpearth/php:7.4-lighttpd.svg)](https://microbadger.com/images/phpearth/php:7.4-lighttpd "Image size") | 30 | | | [`7.4-litespeed`](https://github.com/phpearth/docker-php/tree/master/docker/7.4-litespeed.Dockerfile) | OpenLiteSpeed 1.5.0 RC3 | [![](https://images.microbadger.com/badges/image/phpearth/php:7.4-litespeed.svg)](https://microbadger.com/images/phpearth/php:7.4-litespeed "Image size") | 31 | | | [`7.4-nginx`](https://github.com/phpearth/docker-php/tree/master/docker/7.4-nginx.Dockerfile) | Nginx 1.14.2, FPM | [![](https://images.microbadger.com/badges/image/phpearth/php:7.4-nginx.svg)](https://microbadger.com/images/phpearth/php:7.4-nginx "Image size") | 32 | | | [`7.4-apache`](https://github.com/phpearth/docker-php/tree/master/docker/7.4-apache.Dockerfile) | Apache 2.4.39 | [![](https://images.microbadger.com/badges/image/phpearth/php:7.4-apache.svg)](https://microbadger.com/images/phpearth/php:7.4-apache "Image size") | 33 | | | [`7.4-cgi`](https://github.com/phpearth/docker-php/tree/master/docker/7.4-cgi.Dockerfile) | PHP CGI | [![](https://images.microbadger.com/badges/image/phpearth/php:7.4-cgi.svg)](https://microbadger.com/images/phpearth/php:7.4-cgi "Image size") | 34 | | **PHP 7.3.4**@Alpine 3.9.3 | [`latest`, `7.3`](https://github.com/phpearth/docker-php/tree/master/docker/7.3.Dockerfile) | Small PHP CLI | [![](https://images.microbadger.com/badges/image/phpearth/php:7.3.svg)](https://microbadger.com/images/phpearth/php:7.3 "Image size") | 35 | | | [`7.3-cli`](https://github.com/phpearth/docker-php/tree/master/docker/7.3-cli.Dockerfile) | PHP CLI | [![](https://images.microbadger.com/badges/image/phpearth/php:7.3-cli.svg)](https://microbadger.com/images/phpearth/php:7.3-cli "Image size") | 36 | | | [`7.3-lighttpd`](https://github.com/phpearth/docker-php/tree/master/docker/7.3-lighttpd.Dockerfile) | Lighttpd 1.4.52 | [![](https://images.microbadger.com/badges/image/phpearth/php:7.3-lighttpd.svg)](https://microbadger.com/images/phpearth/php:7.3-lighttpd "Image size") | 37 | | | [`7.3-litespeed`](https://github.com/phpearth/docker-php/tree/master/docker/7.3-litespeed.Dockerfile) | OpenLiteSpeed 1.5.0 RC3 | [![](https://images.microbadger.com/badges/image/phpearth/php:7.3-litespeed.svg)](https://microbadger.com/images/phpearth/php:7.3-litespeed "Image size") | 38 | | | [`7.3-nginx`](https://github.com/phpearth/docker-php/tree/master/docker/7.3-nginx.Dockerfile) | Nginx 1.14.2, FPM | [![](https://images.microbadger.com/badges/image/phpearth/php:7.3-nginx.svg)](https://microbadger.com/images/phpearth/php:7.3-nginx "Image size") | 39 | | | [`7.3-apache`](https://github.com/phpearth/docker-php/tree/master/docker/7.3-apache.Dockerfile) | Apache 2.4.38 | [![](https://images.microbadger.com/badges/image/phpearth/php:7.3-apache.svg)](https://microbadger.com/images/phpearth/php:7.3-apache "Image size") | 40 | | | [`7.3-cgi`](https://github.com/phpearth/docker-php/tree/master/docker/7.3-cgi.Dockerfile) | PHP CGI | [![](https://images.microbadger.com/badges/image/phpearth/php:7.3-cgi.svg)](https://microbadger.com/images/phpearth/php:7.3-cgi "Image size") | 41 | | **PHP 7.2.17**@Alpine 3.9.3 | [`7.2`](https://github.com/phpearth/docker-php/tree/master/docker/7.2.Dockerfile) | Small PHP CLI | [![](https://images.microbadger.com/badges/image/phpearth/php:7.2.svg)](https://microbadger.com/images/phpearth/php:7.2 "Image size") | 42 | | | [`7.2-cli`](https://github.com/phpearth/docker-php/tree/master/docker/7.2-cli.Dockerfile) | PHP CLI | [![](https://images.microbadger.com/badges/image/phpearth/php:7.2-cli.svg)](https://microbadger.com/images/phpearth/php:7.2-cli "Image size") | 43 | | | [`7.2-lighttpd`](https://github.com/phpearth/docker-php/tree/master/docker/7.2-lighttpd.Dockerfile) | Lighttpd 1.4.52 | [![](https://images.microbadger.com/badges/image/phpearth/php:7.2-lighttpd.svg)](https://microbadger.com/images/phpearth/php:7.2-lighttpd "Image size") | 44 | | | [`7.2-litespeed`](https://github.com/phpearth/docker-php/tree/master/docker/7.2-litespeed.Dockerfile) | OpenLiteSpeed 1.5.0 RC3 | [![](https://images.microbadger.com/badges/image/phpearth/php:7.2-litespeed.svg)](https://microbadger.com/images/phpearth/php:7.2-litespeed "Image size") | 45 | | | [`7.2-nginx`](https://github.com/phpearth/docker-php/tree/master/docker/7.2-nginx.Dockerfile) | Nginx 1.14.2, FPM | [![](https://images.microbadger.com/badges/image/phpearth/php:7.2-nginx.svg)](https://microbadger.com/images/phpearth/php:7.2-nginx "Image size") | 46 | | | [`7.2-apache`](https://github.com/phpearth/docker-php/tree/master/docker/7.2-apache.Dockerfile) | Apache 2.4.38 | [![](https://images.microbadger.com/badges/image/phpearth/php:7.2-apache.svg)](https://microbadger.com/images/phpearth/php:7.2-apache "Image size") | 47 | | | [`7.2-cgi`](https://github.com/phpearth/docker-php/tree/master/docker/7.2-cgi.Dockerfile) | PHP CGI | [![](https://images.microbadger.com/badges/image/phpearth/php:7.2-cgi.svg)](https://microbadger.com/images/phpearth/php:7.2-cgi "Image size") | 48 | | **PHP 7.1.28**@Alpine 3.9.3 | [`7.1`](https://github.com/phpearth/docker-php/tree/master/docker/7.1.Dockerfile) | Small PHP CLI | [![](https://images.microbadger.com/badges/image/phpearth/php:7.1.svg)](https://microbadger.com/images/phpearth/php:7.1 "Image size") | 49 | | | [`7.1-cli`](https://github.com/phpearth/docker-php/tree/master/docker/7.1-cli.Dockerfile) | PHP CLI | [![](https://images.microbadger.com/badges/image/phpearth/php:7.1-cli.svg)](https://microbadger.com/images/phpearth/php:7.1-cli "Image size") | 50 | | | [`7.1-lighttpd`](https://github.com/phpearth/docker-php/tree/master/docker/7.1-lighttpd.Dockerfile) | Lighttpd 1.4.52 | [![](https://images.microbadger.com/badges/image/phpearth/php:7.1-lighttpd.svg)](https://microbadger.com/images/phpearth/php:7.1-lighttpd "Image size") | 51 | | | [`7.1-litespeed`](https://github.com/phpearth/docker-php/tree/master/docker/7.1-litespeed.Dockerfile) | OpenLiteSpeed 1.5.0 RC3 | [![](https://images.microbadger.com/badges/image/phpearth/php:7.1-litespeed.svg)](https://microbadger.com/images/phpearth/php:7.1-litespeed "Image size") | 52 | | | [`7.1-nginx`](https://github.com/phpearth/docker-php/tree/master/docker/7.1-nginx.Dockerfile) | Nginx 1.14.2, FPM | [![](https://images.microbadger.com/badges/image/phpearth/php:7.1-nginx.svg)](https://microbadger.com/images/phpearth/php:7.1-nginx "Image size") | 53 | | | [`7.1-apache`](https://github.com/phpearth/docker-php/tree/master/docker/7.1-apache.Dockerfile) | Apache 2.4.38 | [![](https://images.microbadger.com/badges/image/phpearth/php:7.1-apache.svg)](https://microbadger.com/images/phpearth/php:7.1-apache "Image size") | 54 | | | [`7.1-cgi`](https://github.com/phpearth/docker-php/tree/master/docker/7.1-cgi.Dockerfile) | PHP CGI | [![](https://images.microbadger.com/badges/image/phpearth/php:7.1-cgi.svg)](https://microbadger.com/images/phpearth/php:7.1-cgi "Image size") | 55 | | **PHP 7.0.33**@Alpine 3.7.3 | [`7.0`](https://github.com/phpearth/docker-php/tree/master/docker/7.0.Dockerfile) | Small PHP CLI | [![](https://images.microbadger.com/badges/image/phpearth/php:7.0.svg)](https://microbadger.com/images/phpearth/php:7.0 "Image size") | 56 | | | [`7.0-cli`](https://github.com/phpearth/docker-php/tree/master/docker/7.0-cli.Dockerfile) | PHP CLI | [![](https://images.microbadger.com/badges/image/phpearth/php:7.0-cli.svg)](https://microbadger.com/images/phpearth/php:7.0-cli "Image size") | 57 | | | [`7.0-lighttpd`](https://github.com/phpearth/docker-php/tree/master/docker/7.0-lighttpd.Dockerfile) | Lighttpd 1.4.48 | [![](https://images.microbadger.com/badges/image/phpearth/php:7.0-lighttpd.svg)](https://microbadger.com/images/phpearth/php:7.0-lighttpd "Image size") | 58 | | | [`7.0-litespeed`](https://github.com/phpearth/docker-php/tree/master/docker/7.0-litespeed.Dockerfile) | OpenLiteSpeed 1.5.0 RC3 | [![](https://images.microbadger.com/badges/image/phpearth/php:7.0-litespeed.svg)](https://microbadger.com/images/phpearth/php:7.0-litespeed "Image size") | 59 | | | [`7.0-nginx`](https://github.com/phpearth/docker-php/tree/master/docker/7.0-nginx.Dockerfile) | Nginx 1.12.2, FPM | [![](https://images.microbadger.com/badges/image/phpearth/php:7.0-nginx.svg)](https://microbadger.com/images/phpearth/php:7.0-nginx "Image size") | 60 | | | [`7.0-apache`](https://github.com/phpearth/docker-php/tree/master/docker/7.0-apache.Dockerfile) | Apache 2.4.38 | [![](https://images.microbadger.com/badges/image/phpearth/php:7.0-apache.svg)](https://microbadger.com/images/phpearth/php:7.0-apache "Image size") | 61 | | | [`7.0-cgi`](https://github.com/phpearth/docker-php/tree/master/docker/7.0-cgi.Dockerfile) | PHP CGI | [![](https://images.microbadger.com/badges/image/phpearth/php:7.0-cgi.svg)](https://microbadger.com/images/phpearth/php:7.0-cgi "Image size") | 62 | 63 | Tags follow PHP release cycle and [PHP supported versions timeline](http://php.net/supported-versions.php). 64 | 65 | | PHP | Active Support Until | Security Support Until | Info | 66 | | ------- | -------------------- | ---------------------- | ---- | 67 | | **7.4** | TBD | TBD | Development 7.4 branch for testing | 68 | | **7.3** | TBD | TBD | Current recommended branch for production | 69 | | **7.2** | 2019-11-30 | 2020-11-20 | Previous stable branch | 70 | | **7.1** | 2018-12-01 | 2019-12-01 | Previous branch for legacy projects | 71 | | **7.0** | 2017-12-03 | 2018-12-03 | Previous branch for legacy projects, not supported anymore | 72 | 73 | ## Quick usage 74 | 75 | ### Nginx 76 | 77 | `Dockerfile` for running Nginx HTTP server with PHP FPM: 78 | 79 | ```Dockerfile 80 | FROM phpearth/php:7.3-nginx 81 | ``` 82 | 83 | Build Docker image and run Docker container: 84 | 85 | ```bash 86 | docker build -t custom-php . 87 | docker run --name custom-php-container -p 80:80 -d custom-php 88 | ``` 89 | 90 | ### PHP CLI 91 | 92 | To run a CLI PHP script: 93 | 94 | ```bash 95 | docker run -it --rm -v `pwd`:/usr/src/myapp -w /usr/src/myapp phpearth/php php script.php 96 | ``` 97 | 98 | ### Composer 99 | 100 | To install Composer: 101 | 102 | ```Dockerfile 103 | FROM phpearth/php:7.3-nginx 104 | 105 | RUN apk add --no-cache composer 106 | ``` 107 | 108 | ### PHPUnit 109 | 110 | To install PHPUnit: 111 | 112 | ```Dockerfile 113 | FROM phpearth/php:7.3-nginx 114 | 115 | RUN apk add --no-cache phpunit 116 | ``` 117 | 118 | ### OpenLiteSpeed 119 | 120 | To run OpenLiteSpeed web server: 121 | 122 | ```Dockerfile 123 | FROM phpearth/php:7.3-litespeed 124 | ``` 125 | 126 | ### Lighttpd 127 | 128 | To run Lighttpd web server: 129 | 130 | ```Dockerfile 131 | FROM phpearth/php:7.3-lighttpd 132 | ``` 133 | 134 | ### PHP extensions 135 | 136 | To install additional PHP extensions, you can use packages from the [PHP.earth Alpine repository](https://docs.php.earth/linux/alpine): 137 | 138 | ```Dockerfile 139 | FROM phpearth/php:7.3-nginx 140 | 141 | RUN apk add --no-cache php7.3-sodium php7.3-intl php7.3-pdo_mysql 142 | ``` 143 | 144 | or install them with `pecl`: 145 | 146 | ```bash 147 | apk add --no-cache php7.3-dev gcc g++ 148 | pecl install {extension-name} 149 | ``` 150 | 151 | ### PHP ini settings 152 | 153 | To configure extra [php.ini](https://www.php.net/manual/en/ini.php): settings, 154 | create application specific `php.ini` and copy the file into docker image: 155 | 156 | 157 | ```ini 158 | # php.ini 159 | memory_limit = 512M 160 | ``` 161 | 162 | ```Dockerfile 163 | FROM phpearth/php:7.3-nginx 164 | 165 | COPY php.ini $PHP_INI_DIR/conf.d/my-app.ini 166 | ``` 167 | 168 | #### Missing extension? 169 | 170 | In case you'd need an additional extension in the PHP.earth repository, [open an issue](https://github.com/phpearth/docker-php/issues). 171 | 172 | ### Docker Stack 173 | 174 | Docker Stack is way of orchestration of Docker services and simplifies running multiple services of your application. In this example we'll run an Nginx web server with PHP 7.3 FPM with `docker-compose.yml` file. In a new project directory create a `Dockerfile`: 175 | 176 | ```Dockerfile 177 | FROM phpearth/php:7.3-nginx 178 | ``` 179 | 180 | The `docker-compose.yml` file: 181 | 182 | ```yml 183 | version: '3.3' 184 | 185 | services: 186 | app: 187 | image: my-dev-image 188 | volumes: 189 | - .:/var/www/html 190 | ports: 191 | - mode: host 192 | target: 80 193 | published: 80 194 | ``` 195 | 196 | The `index.php` file: 197 | 198 | ```php 199 | > /etc/apk/repositories \ 236 | && apk add --no-cache php7.3 237 | ``` 238 | 239 | PHP.earth Alpine packages are prefixed with `php7.3`, `php7.2`, `php7.1`, and `php7.0`. 240 | 241 | ## Building Images 242 | 243 | Images are automatically build on [Docker Hub](https://hub.docker.com/r/phpearth/php/). 244 | 245 | Docker Cloud and therefore Docker Hub also provides 246 | [overriding and customization](https://docs.docker.com/docker-cloud/builds/advanced/) 247 | of various commands when building images automatically. 248 | 249 | There are some hooks defined in the `docker/hooks` folder: 250 | 251 | * `hooks/build` - executed when building image 252 | * `hooks/post_push` - executed after building image, used to push additional tags 253 | to Docker Hub. 254 | 255 | ### Labels 256 | 257 | [Labels](https://docs.docker.com/engine/userguide/labels-custom-metadata/) are 258 | neat way to expose additional metadata about particular Docker object. We use 259 | [Label Schema](http://label-schema.org/) when defining image labels: 260 | 261 | * `build-date` - Date and time of the build. Defined as 262 | `org.label-schema.build-date=$BUILD_DATE`, where `$BUILD_DATE` is set dynamically 263 | via above `hooks/build` script 264 | * `vcs-url` - Repository location on GitHub. Defined as 265 | `org.label-schema.vcs-url="https://github.com/phpearth/docker-php.git"` 266 | * `vcs-ref` - Reference to commit in Git repository 267 | * `schema-version` - Version of the Label Schema in use. 268 | * `vendor` - Vendor name of the image creators. 269 | * `name` 270 | * `description` 271 | * `url` 272 | 273 | ## License and contributing 274 | 275 | [Contributions](https://github.com/phpearth/docker-php/blob/master/.github/CONTRIBUTING.md) are most welcome. This repository is released under the [MIT license](https://github.com/phpearth/docker-php/blob/master/LICENSE). 276 | -------------------------------------------------------------------------------- /docker/7.0-apache.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.7 2 | 3 | ARG BUILD_DATE 4 | ARG VCS_REF 5 | 6 | LABEL org.label-schema.build-date=$BUILD_DATE \ 7 | org.label-schema.vcs-url="https://github.com/phpearth/docker-php.git" \ 8 | org.label-schema.vcs-ref=$VCS_REF \ 9 | org.label-schema.schema-version="1.0" \ 10 | org.label-schema.vendor="PHP.earth" \ 11 | org.label-schema.name="docker-php" \ 12 | org.label-schema.description="Docker For PHP Developers - Docker image with PHP 7.0, Apache, and Alpine" \ 13 | org.label-schema.url="https://github.com/phpearth/docker-php" 14 | 15 | # PHP_INI_DIR to be symmetrical with official php docker image 16 | ENV PHP_INI_DIR /etc/php/7.0 17 | 18 | # When using Composer, disable the warning about running commands as root/super user 19 | ENV COMPOSER_ALLOW_SUPERUSER=1 20 | 21 | # Persistent runtime dependencies 22 | ARG DEPS="\ 23 | php7.0 \ 24 | php7.0-phar \ 25 | php7.0-bcmath \ 26 | php7.0-calendar \ 27 | php7.0-mbstring \ 28 | php7.0-exif \ 29 | php7.0-ftp \ 30 | php7.0-openssl \ 31 | php7.0-zip \ 32 | php7.0-sysvsem \ 33 | php7.0-sysvshm \ 34 | php7.0-sysvmsg \ 35 | php7.0-shmop \ 36 | php7.0-sockets \ 37 | php7.0-zlib \ 38 | php7.0-bz2 \ 39 | php7.0-curl \ 40 | php7.0-simplexml \ 41 | php7.0-xml \ 42 | php7.0-opcache \ 43 | php7.0-dom \ 44 | php7.0-xmlreader \ 45 | php7.0-xmlwriter \ 46 | php7.0-tokenizer \ 47 | php7.0-ctype \ 48 | php7.0-session \ 49 | php7.0-fileinfo \ 50 | php7.0-iconv \ 51 | php7.0-json \ 52 | php7.0-posix \ 53 | php7.0-apache2 \ 54 | curl \ 55 | ca-certificates \ 56 | runit \ 57 | apache2 \ 58 | " 59 | 60 | # PHP.earth Alpine repository for better developer experience 61 | ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub 62 | 63 | RUN set -x \ 64 | && echo "https://repos.php.earth/alpine/v3.7" >> /etc/apk/repositories \ 65 | && apk add --no-cache $DEPS \ 66 | && mkdir -p /run/apache2 \ 67 | && ln -sf /dev/stdout /var/log/apache2/access.log \ 68 | && ln -sf /dev/stderr /var/log/apache2/error.log 69 | 70 | COPY tags/apache / 71 | 72 | EXPOSE 80 73 | 74 | CMD ["/sbin/runit-wrapper"] 75 | -------------------------------------------------------------------------------- /docker/7.0-cgi.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.7 2 | 3 | ARG BUILD_DATE 4 | ARG VCS_REF 5 | 6 | LABEL org.label-schema.build-date=$BUILD_DATE \ 7 | org.label-schema.vcs-url="https://github.com/phpearth/docker-php.git" \ 8 | org.label-schema.vcs-ref=$VCS_REF \ 9 | org.label-schema.schema-version="1.0" \ 10 | org.label-schema.vendor="PHP.earth" \ 11 | org.label-schema.name="docker-php" \ 12 | org.label-schema.description="Docker For PHP Developers - Docker image with PHP CGI 7.0, and Alpine" \ 13 | org.label-schema.url="https://github.com/phpearth/docker-php" 14 | 15 | # PHP_INI_DIR to be symmetrical with official php docker image 16 | ENV PHP_INI_DIR /etc/php/7.0 17 | 18 | # When using Composer, disable the warning about running commands as root/super user 19 | ENV COMPOSER_ALLOW_SUPERUSER=1 20 | 21 | # Persistent runtime dependencies 22 | ARG DEPS="\ 23 | php7.0 \ 24 | php7.0-phar \ 25 | php7.0-bcmath \ 26 | php7.0-calendar \ 27 | php7.0-mbstring \ 28 | php7.0-exif \ 29 | php7.0-ftp \ 30 | php7.0-openssl \ 31 | php7.0-zip \ 32 | php7.0-sysvsem \ 33 | php7.0-sysvshm \ 34 | php7.0-sysvmsg \ 35 | php7.0-shmop \ 36 | php7.0-sockets \ 37 | php7.0-zlib \ 38 | php7.0-bz2 \ 39 | php7.0-curl \ 40 | php7.0-simplexml \ 41 | php7.0-xml \ 42 | php7.0-opcache \ 43 | php7.0-dom \ 44 | php7.0-xmlreader \ 45 | php7.0-xmlwriter \ 46 | php7.0-tokenizer \ 47 | php7.0-ctype \ 48 | php7.0-session \ 49 | php7.0-fileinfo \ 50 | php7.0-iconv \ 51 | php7.0-json \ 52 | php7.0-posix \ 53 | php7.0-cgi \ 54 | curl \ 55 | ca-certificates \ 56 | runit \ 57 | " 58 | 59 | # PHP.earth Alpine repository for better developer experience 60 | ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub 61 | 62 | RUN set -x \ 63 | && echo "https://repos.php.earth/alpine/v3.7" >> /etc/apk/repositories \ 64 | && apk add --no-cache $DEPS 65 | 66 | CMD ["php", "-a"] 67 | -------------------------------------------------------------------------------- /docker/7.0-cli.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.7 2 | 3 | ARG BUILD_DATE 4 | ARG VCS_REF 5 | 6 | LABEL org.label-schema.build-date=$BUILD_DATE \ 7 | org.label-schema.vcs-url="https://github.com/phpearth/docker-php.git" \ 8 | org.label-schema.vcs-ref=$VCS_REF \ 9 | org.label-schema.schema-version="1.0" \ 10 | org.label-schema.vendor="PHP.earth" \ 11 | org.label-schema.name="docker-php" \ 12 | org.label-schema.description="Docker For PHP Developers - Docker image with PHP CLI 7.0, additional PHP extensions, and Alpine" \ 13 | org.label-schema.url="https://github.com/phpearth/docker-php" 14 | 15 | # PHP_INI_DIR to be symmetrical with official php docker image 16 | ENV PHP_INI_DIR /etc/php/7.0 17 | 18 | # When using Composer, disable the warning about running commands as root/super user 19 | ENV COMPOSER_ALLOW_SUPERUSER=1 20 | 21 | # Persistent runtime dependencies 22 | ARG DEPS="\ 23 | php7.0 \ 24 | php7.0-phar \ 25 | php7.0-bcmath \ 26 | php7.0-calendar \ 27 | php7.0-mbstring \ 28 | php7.0-exif \ 29 | php7.0-ftp \ 30 | php7.0-openssl \ 31 | php7.0-zip \ 32 | php7.0-sysvsem \ 33 | php7.0-sysvshm \ 34 | php7.0-sysvmsg \ 35 | php7.0-shmop \ 36 | php7.0-sockets \ 37 | php7.0-zlib \ 38 | php7.0-bz2 \ 39 | php7.0-curl \ 40 | php7.0-simplexml \ 41 | php7.0-xml \ 42 | php7.0-opcache \ 43 | php7.0-dom \ 44 | php7.0-xmlreader \ 45 | php7.0-xmlwriter \ 46 | php7.0-tokenizer \ 47 | php7.0-ctype \ 48 | php7.0-session \ 49 | php7.0-fileinfo \ 50 | php7.0-iconv \ 51 | php7.0-json \ 52 | php7.0-posix \ 53 | curl \ 54 | ca-certificates \ 55 | " 56 | 57 | # PHP.earth Alpine repository for better developer experience 58 | ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub 59 | 60 | RUN set -x \ 61 | && echo "https://repos.php.earth/alpine/v3.7" >> /etc/apk/repositories \ 62 | && apk add --no-cache $DEPS 63 | 64 | CMD ["php", "-a"] 65 | -------------------------------------------------------------------------------- /docker/7.0-lighttpd.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.7 2 | 3 | ARG BUILD_DATE 4 | ARG VCS_REF 5 | 6 | LABEL org.label-schema.build-date=$BUILD_DATE \ 7 | org.label-schema.vcs-url="https://github.com/phpearth/docker-php.git" \ 8 | org.label-schema.vcs-ref=$VCS_REF \ 9 | org.label-schema.schema-version="1.0" \ 10 | org.label-schema.vendor="PHP.earth" \ 11 | org.label-schema.name="docker-php" \ 12 | org.label-schema.description="Docker For PHP Developers - Docker image with PHP 7.0, Lighttpd, and Alpine" \ 13 | org.label-schema.url="https://github.com/phpearth/docker-php" 14 | 15 | # PHP_INI_DIR to be symmetrical with official php docker image 16 | ENV PHP_INI_DIR /etc/php/7.0 17 | 18 | # When using Composer, disable the warning about running commands as root/super user 19 | ENV COMPOSER_ALLOW_SUPERUSER=1 20 | 21 | # Persistent runtime dependencies 22 | ARG DEPS="\ 23 | lighttpd \ 24 | php7.0 \ 25 | php7.0-phar \ 26 | php7.0-bcmath \ 27 | php7.0-calendar \ 28 | php7.0-mbstring \ 29 | php7.0-exif \ 30 | php7.0-ftp \ 31 | php7.0-openssl \ 32 | php7.0-zip \ 33 | php7.0-sysvsem \ 34 | php7.0-sysvshm \ 35 | php7.0-sysvmsg \ 36 | php7.0-shmop \ 37 | php7.0-sockets \ 38 | php7.0-zlib \ 39 | php7.0-bz2 \ 40 | php7.0-curl \ 41 | php7.0-simplexml \ 42 | php7.0-xml \ 43 | php7.0-opcache \ 44 | php7.0-dom \ 45 | php7.0-xmlreader \ 46 | php7.0-xmlwriter \ 47 | php7.0-tokenizer \ 48 | php7.0-ctype \ 49 | php7.0-session \ 50 | php7.0-fileinfo \ 51 | php7.0-iconv \ 52 | php7.0-json \ 53 | php7.0-posix \ 54 | php7.0-fpm \ 55 | curl \ 56 | ca-certificates \ 57 | runit \ 58 | " 59 | 60 | # PHP.earth Alpine repository for better developer experience 61 | ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub 62 | 63 | RUN set -x \ 64 | && echo "https://repos.php.earth/alpine/v3.7" >> /etc/apk/repositories \ 65 | && apk add --no-cache $DEPS 66 | 67 | COPY tags/lighttpd / 68 | 69 | EXPOSE 80 70 | 71 | CMD ["/sbin/runit-wrapper"] 72 | -------------------------------------------------------------------------------- /docker/7.0-litespeed.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.7 2 | 3 | ARG BUILD_DATE 4 | ARG VCS_REF 5 | 6 | LABEL org.label-schema.build-date=$BUILD_DATE \ 7 | org.label-schema.vcs-url="https://github.com/phpearth/docker-php.git" \ 8 | org.label-schema.vcs-ref=$VCS_REF \ 9 | org.label-schema.schema-version="1.0" \ 10 | org.label-schema.vendor="PHP.earth" \ 11 | org.label-schema.name="docker-php" \ 12 | org.label-schema.description="Docker For PHP Developers - Docker image with PHP 7.0, OpenLiteSpeed, and Alpine" \ 13 | org.label-schema.url="https://github.com/phpearth/docker-php" 14 | 15 | # PHP_INI_DIR to be symmetrical with official php docker image 16 | ENV PHP_INI_DIR /etc/php/7.0 17 | 18 | # When using Composer, disable the warning about running commands as root/super user 19 | ENV COMPOSER_ALLOW_SUPERUSER=1 20 | 21 | # Persistent runtime dependencies 22 | ARG DEPS="\ 23 | curl \ 24 | ca-certificates \ 25 | runit \ 26 | php7.0 \ 27 | php7.0-phar \ 28 | php7.0-bcmath \ 29 | php7.0-calendar \ 30 | php7.0-mbstring \ 31 | php7.0-exif \ 32 | php7.0-ftp \ 33 | php7.0-openssl \ 34 | php7.0-zip \ 35 | php7.0-sysvsem \ 36 | php7.0-sysvshm \ 37 | php7.0-sysvmsg \ 38 | php7.0-shmop \ 39 | php7.0-sockets \ 40 | php7.0-zlib \ 41 | php7.0-bz2 \ 42 | php7.0-curl \ 43 | php7.0-simplexml \ 44 | php7.0-xml \ 45 | php7.0-opcache \ 46 | php7.0-dom \ 47 | php7.0-xmlreader \ 48 | php7.0-xmlwriter \ 49 | php7.0-tokenizer \ 50 | php7.0-ctype \ 51 | php7.0-session \ 52 | php7.0-fileinfo \ 53 | php7.0-iconv \ 54 | php7.0-json \ 55 | php7.0-posix \ 56 | php7.0-litespeed \ 57 | litespeed \ 58 | " 59 | 60 | # PHP.earth Alpine repository for better developer experience 61 | ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub 62 | 63 | RUN set -x \ 64 | && echo "https://repos.php.earth/alpine/v3.7" >> /etc/apk/repositories \ 65 | && apk add --no-cache $DEPS \ 66 | && ln -sf /dev/stdout /var/lib/litespeed/logs/access.log \ 67 | && ln -sf /dev/stderr /var/lib/litespeed/logs/error.log 68 | 69 | COPY tags/litespeed / 70 | 71 | EXPOSE 8088 7080 72 | 73 | CMD ["/sbin/runit-wrapper"] 74 | -------------------------------------------------------------------------------- /docker/7.0-nginx.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.7 2 | 3 | ARG BUILD_DATE 4 | ARG VCS_REF 5 | 6 | LABEL org.label-schema.build-date=$BUILD_DATE \ 7 | org.label-schema.vcs-url="https://github.com/phpearth/docker-php.git" \ 8 | org.label-schema.vcs-ref=$VCS_REF \ 9 | org.label-schema.schema-version="1.0" \ 10 | org.label-schema.vendor="PHP.earth" \ 11 | org.label-schema.name="docker-php" \ 12 | org.label-schema.description="Docker For PHP Developers - Docker image with PHP 7.0, Nginx, and Alpine" \ 13 | org.label-schema.url="https://github.com/phpearth/docker-php" 14 | 15 | # PHP_INI_DIR to be symmetrical with official php docker image 16 | ENV PHP_INI_DIR /etc/php/7.0 17 | 18 | # When using Composer, disable the warning about running commands as root/super user 19 | ENV COMPOSER_ALLOW_SUPERUSER=1 20 | 21 | # Persistent runtime dependencies 22 | ARG DEPS="\ 23 | nginx \ 24 | nginx-mod-http-headers-more \ 25 | php7.0 \ 26 | php7.0-phar \ 27 | php7.0-bcmath \ 28 | php7.0-calendar \ 29 | php7.0-mbstring \ 30 | php7.0-exif \ 31 | php7.0-ftp \ 32 | php7.0-openssl \ 33 | php7.0-zip \ 34 | php7.0-sysvsem \ 35 | php7.0-sysvshm \ 36 | php7.0-sysvmsg \ 37 | php7.0-shmop \ 38 | php7.0-sockets \ 39 | php7.0-zlib \ 40 | php7.0-bz2 \ 41 | php7.0-curl \ 42 | php7.0-simplexml \ 43 | php7.0-xml \ 44 | php7.0-opcache \ 45 | php7.0-dom \ 46 | php7.0-xmlreader \ 47 | php7.0-xmlwriter \ 48 | php7.0-tokenizer \ 49 | php7.0-ctype \ 50 | php7.0-session \ 51 | php7.0-fileinfo \ 52 | php7.0-iconv \ 53 | php7.0-json \ 54 | php7.0-posix \ 55 | php7.0-fpm \ 56 | curl \ 57 | ca-certificates \ 58 | runit \ 59 | " 60 | 61 | # PHP.earth Alpine repository for better developer experience 62 | ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub 63 | 64 | RUN set -x \ 65 | && echo "https://repos.php.earth/alpine/v3.7" >> /etc/apk/repositories \ 66 | && apk add --no-cache $DEPS \ 67 | && ln -sf /dev/stdout /var/log/nginx/access.log \ 68 | && ln -sf /dev/stderr /var/log/nginx/error.log 69 | 70 | COPY tags/nginx / 71 | 72 | EXPOSE 80 73 | 74 | CMD ["/sbin/runit-wrapper"] 75 | -------------------------------------------------------------------------------- /docker/7.0.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.7 2 | 3 | ARG BUILD_DATE 4 | ARG VCS_REF 5 | 6 | LABEL org.label-schema.build-date=$BUILD_DATE \ 7 | org.label-schema.vcs-url="https://github.com/phpearth/docker-php.git" \ 8 | org.label-schema.vcs-ref=$VCS_REF \ 9 | org.label-schema.schema-version="1.0" \ 10 | org.label-schema.vendor="PHP.earth" \ 11 | org.label-schema.name="docker-php" \ 12 | org.label-schema.description="Docker For PHP Developers - Docker image with PHP CLI 7.0, and Alpine" \ 13 | org.label-schema.url="https://github.com/phpearth/docker-php" 14 | 15 | # PHP_INI_DIR to be symmetrical with official php docker image 16 | ENV PHP_INI_DIR /etc/php/7.0 17 | 18 | # When using Composer, disable the warning about running commands as root/super user 19 | ENV COMPOSER_ALLOW_SUPERUSER=1 20 | 21 | # Persistent runtime dependencies 22 | ARG DEPS="\ 23 | php7.0 \ 24 | curl \ 25 | ca-certificates \ 26 | " 27 | 28 | # PHP.earth Alpine repository for better developer experience 29 | ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub 30 | 31 | RUN set -x \ 32 | && echo "https://repos.php.earth/alpine/v3.7" >> /etc/apk/repositories \ 33 | && apk add --no-cache $DEPS 34 | 35 | CMD ["php", "-a"] 36 | -------------------------------------------------------------------------------- /docker/7.1-apache.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.9 2 | 3 | ARG BUILD_DATE 4 | ARG VCS_REF 5 | 6 | LABEL org.label-schema.build-date=$BUILD_DATE \ 7 | org.label-schema.vcs-url="https://github.com/phpearth/docker-php.git" \ 8 | org.label-schema.vcs-ref=$VCS_REF \ 9 | org.label-schema.schema-version="1.0" \ 10 | org.label-schema.vendor="PHP.earth" \ 11 | org.label-schema.name="docker-php" \ 12 | org.label-schema.description="Docker For PHP Developers - Docker image with PHP 7.1, Apache, and Alpine" \ 13 | org.label-schema.url="https://github.com/phpearth/docker-php" 14 | 15 | # PHP_INI_DIR to be symmetrical with official php docker image 16 | ENV PHP_INI_DIR /etc/php/7.1 17 | 18 | # When using Composer, disable the warning about running commands as root/super user 19 | ENV COMPOSER_ALLOW_SUPERUSER=1 20 | 21 | # Persistent runtime dependencies 22 | ARG DEPS="\ 23 | php7.1 \ 24 | php7.1-phar \ 25 | php7.1-bcmath \ 26 | php7.1-calendar \ 27 | php7.1-mbstring \ 28 | php7.1-exif \ 29 | php7.1-ftp \ 30 | php7.1-openssl \ 31 | php7.1-zip \ 32 | php7.1-sysvsem \ 33 | php7.1-sysvshm \ 34 | php7.1-sysvmsg \ 35 | php7.1-shmop \ 36 | php7.1-sockets \ 37 | php7.1-zlib \ 38 | php7.1-bz2 \ 39 | php7.1-curl \ 40 | php7.1-simplexml \ 41 | php7.1-xml \ 42 | php7.1-opcache \ 43 | php7.1-dom \ 44 | php7.1-xmlreader \ 45 | php7.1-xmlwriter \ 46 | php7.1-tokenizer \ 47 | php7.1-ctype \ 48 | php7.1-session \ 49 | php7.1-fileinfo \ 50 | php7.1-iconv \ 51 | php7.1-json \ 52 | php7.1-posix \ 53 | php7.1-apache2 \ 54 | curl \ 55 | ca-certificates \ 56 | runit \ 57 | apache2 \ 58 | " 59 | 60 | # PHP.earth Alpine repository for better developer experience 61 | ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub 62 | 63 | RUN set -x \ 64 | && echo "https://repos.php.earth/alpine/v3.9" >> /etc/apk/repositories \ 65 | && apk add --no-cache $DEPS \ 66 | && mkdir -p /run/apache2 \ 67 | && ln -sf /dev/stdout /var/log/apache2/access.log \ 68 | && ln -sf /dev/stderr /var/log/apache2/error.log 69 | 70 | COPY tags/apache / 71 | 72 | EXPOSE 80 73 | 74 | CMD ["/sbin/runit-wrapper"] 75 | -------------------------------------------------------------------------------- /docker/7.1-cgi.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.9 2 | 3 | ARG BUILD_DATE 4 | ARG VCS_REF 5 | 6 | LABEL org.label-schema.build-date=$BUILD_DATE \ 7 | org.label-schema.vcs-url="https://github.com/phpearth/docker-php.git" \ 8 | org.label-schema.vcs-ref=$VCS_REF \ 9 | org.label-schema.schema-version="1.0" \ 10 | org.label-schema.vendor="PHP.earth" \ 11 | org.label-schema.name="docker-php" \ 12 | org.label-schema.description="Docker For PHP Developers - Docker image with PHP CGI 7.1, and Alpine" \ 13 | org.label-schema.url="https://github.com/phpearth/docker-php" 14 | 15 | # PHP_INI_DIR to be symmetrical with official php docker image 16 | ENV PHP_INI_DIR /etc/php/7.1 17 | 18 | # When using Composer, disable the warning about running commands as root/super user 19 | ENV COMPOSER_ALLOW_SUPERUSER=1 20 | 21 | # Persistent runtime dependencies 22 | ARG DEPS="\ 23 | php7.1 \ 24 | php7.1-phar \ 25 | php7.1-bcmath \ 26 | php7.1-calendar \ 27 | php7.1-mbstring \ 28 | php7.1-exif \ 29 | php7.1-ftp \ 30 | php7.1-openssl \ 31 | php7.1-zip \ 32 | php7.1-sysvsem \ 33 | php7.1-sysvshm \ 34 | php7.1-sysvmsg \ 35 | php7.1-shmop \ 36 | php7.1-sockets \ 37 | php7.1-zlib \ 38 | php7.1-bz2 \ 39 | php7.1-curl \ 40 | php7.1-simplexml \ 41 | php7.1-xml \ 42 | php7.1-opcache \ 43 | php7.1-dom \ 44 | php7.1-xmlreader \ 45 | php7.1-xmlwriter \ 46 | php7.1-tokenizer \ 47 | php7.1-ctype \ 48 | php7.1-session \ 49 | php7.1-fileinfo \ 50 | php7.1-iconv \ 51 | php7.1-json \ 52 | php7.1-posix \ 53 | php7.1-cgi \ 54 | curl \ 55 | ca-certificates \ 56 | runit \ 57 | " 58 | 59 | # PHP.earth Alpine repository for better developer experience 60 | ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub 61 | 62 | RUN set -x \ 63 | && echo "https://repos.php.earth/alpine/v3.9" >> /etc/apk/repositories \ 64 | && apk add --no-cache $DEPS 65 | 66 | CMD ["php", "-a"] 67 | -------------------------------------------------------------------------------- /docker/7.1-cli.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.9 2 | 3 | ARG BUILD_DATE 4 | ARG VCS_REF 5 | 6 | LABEL org.label-schema.build-date=$BUILD_DATE \ 7 | org.label-schema.vcs-url="https://github.com/phpearth/docker-php.git" \ 8 | org.label-schema.vcs-ref=$VCS_REF \ 9 | org.label-schema.schema-version="1.0" \ 10 | org.label-schema.vendor="PHP.earth" \ 11 | org.label-schema.name="docker-php" \ 12 | org.label-schema.description="Docker For PHP Developers - Docker image with PHP CLI 7.1, additional PHP extensions, and Alpine" \ 13 | org.label-schema.url="https://github.com/phpearth/docker-php" 14 | 15 | # PHP_INI_DIR to be symmetrical with official php docker image 16 | ENV PHP_INI_DIR /etc/php/7.1 17 | 18 | # When using Composer, disable the warning about running commands as root/super user 19 | ENV COMPOSER_ALLOW_SUPERUSER=1 20 | 21 | # Persistent runtime dependencies 22 | ARG DEPS="\ 23 | php7.1 \ 24 | php7.1-phar \ 25 | php7.1-bcmath \ 26 | php7.1-calendar \ 27 | php7.1-mbstring \ 28 | php7.1-exif \ 29 | php7.1-ftp \ 30 | php7.1-openssl \ 31 | php7.1-zip \ 32 | php7.1-sysvsem \ 33 | php7.1-sysvshm \ 34 | php7.1-sysvmsg \ 35 | php7.1-shmop \ 36 | php7.1-sockets \ 37 | php7.1-zlib \ 38 | php7.1-bz2 \ 39 | php7.1-curl \ 40 | php7.1-simplexml \ 41 | php7.1-xml \ 42 | php7.1-opcache \ 43 | php7.1-dom \ 44 | php7.1-xmlreader \ 45 | php7.1-xmlwriter \ 46 | php7.1-tokenizer \ 47 | php7.1-ctype \ 48 | php7.1-session \ 49 | php7.1-fileinfo \ 50 | php7.1-iconv \ 51 | php7.1-json \ 52 | php7.1-posix \ 53 | curl \ 54 | ca-certificates \ 55 | " 56 | 57 | # PHP.earth Alpine repository for better developer experience 58 | ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub 59 | 60 | RUN set -x \ 61 | && echo "https://repos.php.earth/alpine/v3.9" >> /etc/apk/repositories \ 62 | && apk add --no-cache $DEPS 63 | 64 | CMD ["php", "-a"] 65 | -------------------------------------------------------------------------------- /docker/7.1-lighttpd.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.9 2 | 3 | ARG BUILD_DATE 4 | ARG VCS_REF 5 | 6 | LABEL org.label-schema.build-date=$BUILD_DATE \ 7 | org.label-schema.vcs-url="https://github.com/phpearth/docker-php.git" \ 8 | org.label-schema.vcs-ref=$VCS_REF \ 9 | org.label-schema.schema-version="1.0" \ 10 | org.label-schema.vendor="PHP.earth" \ 11 | org.label-schema.name="docker-php" \ 12 | org.label-schema.description="Docker For PHP Developers - Docker image with PHP 7.1, Lighttpd, and Alpine" \ 13 | org.label-schema.url="https://github.com/phpearth/docker-php" 14 | 15 | # PHP_INI_DIR to be symmetrical with official php docker image 16 | ENV PHP_INI_DIR /etc/php/7.1 17 | 18 | # When using Composer, disable the warning about running commands as root/super user 19 | ENV COMPOSER_ALLOW_SUPERUSER=1 20 | 21 | # Persistent runtime dependencies 22 | ARG DEPS="\ 23 | lighttpd \ 24 | php7.1 \ 25 | php7.1-phar \ 26 | php7.1-bcmath \ 27 | php7.1-calendar \ 28 | php7.1-mbstring \ 29 | php7.1-exif \ 30 | php7.1-ftp \ 31 | php7.1-openssl \ 32 | php7.1-zip \ 33 | php7.1-sysvsem \ 34 | php7.1-sysvshm \ 35 | php7.1-sysvmsg \ 36 | php7.1-shmop \ 37 | php7.1-sockets \ 38 | php7.1-zlib \ 39 | php7.1-bz2 \ 40 | php7.1-curl \ 41 | php7.1-simplexml \ 42 | php7.1-xml \ 43 | php7.1-opcache \ 44 | php7.1-dom \ 45 | php7.1-xmlreader \ 46 | php7.1-xmlwriter \ 47 | php7.1-tokenizer \ 48 | php7.1-ctype \ 49 | php7.1-session \ 50 | php7.1-fileinfo \ 51 | php7.1-iconv \ 52 | php7.1-json \ 53 | php7.1-posix \ 54 | php7.1-fpm \ 55 | curl \ 56 | ca-certificates \ 57 | runit \ 58 | " 59 | 60 | # PHP.earth Alpine repository for better developer experience 61 | ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub 62 | 63 | RUN set -x \ 64 | && echo "https://repos.php.earth/alpine/v3.9" >> /etc/apk/repositories \ 65 | && apk add --no-cache $DEPS 66 | 67 | COPY tags/lighttpd / 68 | 69 | EXPOSE 80 70 | 71 | CMD ["/sbin/runit-wrapper"] 72 | -------------------------------------------------------------------------------- /docker/7.1-litespeed.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.9 2 | 3 | ARG BUILD_DATE 4 | ARG VCS_REF 5 | 6 | LABEL org.label-schema.build-date=$BUILD_DATE \ 7 | org.label-schema.vcs-url="https://github.com/phpearth/docker-php.git" \ 8 | org.label-schema.vcs-ref=$VCS_REF \ 9 | org.label-schema.schema-version="1.0" \ 10 | org.label-schema.vendor="PHP.earth" \ 11 | org.label-schema.name="docker-php" \ 12 | org.label-schema.description="Docker For PHP Developers - Docker image with PHP 7.1, OpenLiteSpeed, and Alpine" \ 13 | org.label-schema.url="https://github.com/phpearth/docker-php" 14 | 15 | # PHP_INI_DIR to be symmetrical with official php docker image 16 | ENV PHP_INI_DIR /etc/php/7.1 17 | 18 | # When using Composer, disable the warning about running commands as root/super user 19 | ENV COMPOSER_ALLOW_SUPERUSER=1 20 | 21 | # Persistent runtime dependencies 22 | ARG DEPS="\ 23 | curl \ 24 | ca-certificates \ 25 | runit \ 26 | php7.1 \ 27 | php7.1-phar \ 28 | php7.1-bcmath \ 29 | php7.1-calendar \ 30 | php7.1-mbstring \ 31 | php7.1-exif \ 32 | php7.1-ftp \ 33 | php7.1-openssl \ 34 | php7.1-zip \ 35 | php7.1-sysvsem \ 36 | php7.1-sysvshm \ 37 | php7.1-sysvmsg \ 38 | php7.1-shmop \ 39 | php7.1-sockets \ 40 | php7.1-zlib \ 41 | php7.1-bz2 \ 42 | php7.1-curl \ 43 | php7.1-simplexml \ 44 | php7.1-xml \ 45 | php7.1-opcache \ 46 | php7.1-dom \ 47 | php7.1-xmlreader \ 48 | php7.1-xmlwriter \ 49 | php7.1-tokenizer \ 50 | php7.1-ctype \ 51 | php7.1-session \ 52 | php7.1-fileinfo \ 53 | php7.1-iconv \ 54 | php7.1-json \ 55 | php7.1-posix \ 56 | php7.1-litespeed \ 57 | litespeed \ 58 | " 59 | 60 | # PHP.earth Alpine repository for better developer experience 61 | ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub 62 | 63 | RUN set -x \ 64 | && echo "https://repos.php.earth/alpine/v3.9" >> /etc/apk/repositories \ 65 | && apk add --no-cache $DEPS \ 66 | && ln -sf /dev/stdout /var/lib/litespeed/logs/access.log \ 67 | && ln -sf /dev/stderr /var/lib/litespeed/logs/error.log 68 | 69 | COPY tags/litespeed / 70 | 71 | EXPOSE 8088 7080 72 | 73 | CMD ["/sbin/runit-wrapper"] 74 | -------------------------------------------------------------------------------- /docker/7.1-nginx.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.9 2 | 3 | ARG BUILD_DATE 4 | ARG VCS_REF 5 | 6 | LABEL org.label-schema.build-date=$BUILD_DATE \ 7 | org.label-schema.vcs-url="https://github.com/phpearth/docker-php.git" \ 8 | org.label-schema.vcs-ref=$VCS_REF \ 9 | org.label-schema.schema-version="1.0" \ 10 | org.label-schema.vendor="PHP.earth" \ 11 | org.label-schema.name="docker-php" \ 12 | org.label-schema.description="Docker For PHP Developers - Docker image with PHP 7.1, Nginx, and Alpine" \ 13 | org.label-schema.url="https://github.com/phpearth/docker-php" 14 | 15 | # PHP_INI_DIR to be symmetrical with official php docker image 16 | ENV PHP_INI_DIR /etc/php/7.1 17 | 18 | # When using Composer, disable the warning about running commands as root/super user 19 | ENV COMPOSER_ALLOW_SUPERUSER=1 20 | 21 | # Persistent runtime dependencies 22 | ARG DEPS="\ 23 | nginx \ 24 | nginx-mod-http-headers-more \ 25 | php7.1 \ 26 | php7.1-phar \ 27 | php7.1-bcmath \ 28 | php7.1-calendar \ 29 | php7.1-mbstring \ 30 | php7.1-exif \ 31 | php7.1-ftp \ 32 | php7.1-openssl \ 33 | php7.1-zip \ 34 | php7.1-sysvsem \ 35 | php7.1-sysvshm \ 36 | php7.1-sysvmsg \ 37 | php7.1-shmop \ 38 | php7.1-sockets \ 39 | php7.1-zlib \ 40 | php7.1-bz2 \ 41 | php7.1-curl \ 42 | php7.1-simplexml \ 43 | php7.1-xml \ 44 | php7.1-opcache \ 45 | php7.1-dom \ 46 | php7.1-xmlreader \ 47 | php7.1-xmlwriter \ 48 | php7.1-tokenizer \ 49 | php7.1-ctype \ 50 | php7.1-session \ 51 | php7.1-fileinfo \ 52 | php7.1-iconv \ 53 | php7.1-json \ 54 | php7.1-posix \ 55 | php7.1-fpm \ 56 | curl \ 57 | ca-certificates \ 58 | runit \ 59 | " 60 | 61 | # PHP.earth Alpine repository for better developer experience 62 | ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub 63 | 64 | RUN set -x \ 65 | && echo "https://repos.php.earth/alpine/v3.9" >> /etc/apk/repositories \ 66 | && apk add --no-cache $DEPS \ 67 | && ln -sf /dev/stdout /var/log/nginx/access.log \ 68 | && ln -sf /dev/stderr /var/log/nginx/error.log 69 | 70 | COPY tags/nginx / 71 | 72 | EXPOSE 80 73 | 74 | CMD ["/sbin/runit-wrapper"] 75 | -------------------------------------------------------------------------------- /docker/7.1.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.9 2 | 3 | ARG BUILD_DATE 4 | ARG VCS_REF 5 | 6 | LABEL org.label-schema.build-date=$BUILD_DATE \ 7 | org.label-schema.vcs-url="https://github.com/phpearth/docker-php.git" \ 8 | org.label-schema.vcs-ref=$VCS_REF \ 9 | org.label-schema.schema-version="1.0" \ 10 | org.label-schema.vendor="PHP.earth" \ 11 | org.label-schema.name="docker-php" \ 12 | org.label-schema.description="Docker For PHP Developers - Docker image with PHP CLI 7.1, and Alpine" \ 13 | org.label-schema.url="https://github.com/phpearth/docker-php" 14 | 15 | # PHP_INI_DIR to be symmetrical with official php docker image 16 | ENV PHP_INI_DIR /etc/php/7.1 17 | 18 | # When using Composer, disable the warning about running commands as root/super user 19 | ENV COMPOSER_ALLOW_SUPERUSER=1 20 | 21 | # Persistent runtime dependencies 22 | ARG DEPS="\ 23 | php7.1 \ 24 | curl \ 25 | ca-certificates \ 26 | " 27 | 28 | # PHP.earth Alpine repository for better developer experience 29 | ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub 30 | 31 | RUN set -x \ 32 | && echo "https://repos.php.earth/alpine/v3.9" >> /etc/apk/repositories \ 33 | && apk add --no-cache $DEPS 34 | 35 | CMD ["php", "-a"] 36 | -------------------------------------------------------------------------------- /docker/7.2-apache.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.9 2 | 3 | ARG BUILD_DATE 4 | ARG VCS_REF 5 | 6 | LABEL org.label-schema.build-date=$BUILD_DATE \ 7 | org.label-schema.vcs-url="https://github.com/phpearth/docker-php.git" \ 8 | org.label-schema.vcs-ref=$VCS_REF \ 9 | org.label-schema.schema-version="1.0" \ 10 | org.label-schema.vendor="PHP.earth" \ 11 | org.label-schema.name="docker-php" \ 12 | org.label-schema.description="Docker For PHP Developers - Docker image with PHP 7.2, Apache, and Alpine" \ 13 | org.label-schema.url="https://github.com/phpearth/docker-php" 14 | 15 | # PHP_INI_DIR to be symmetrical with official php docker image 16 | ENV PHP_INI_DIR /etc/php/7.2 17 | 18 | # When using Composer, disable the warning about running commands as root/super user 19 | ENV COMPOSER_ALLOW_SUPERUSER=1 20 | 21 | # Persistent runtime dependencies 22 | ARG DEPS="\ 23 | php7.2 \ 24 | php7.2-phar \ 25 | php7.2-bcmath \ 26 | php7.2-calendar \ 27 | php7.2-mbstring \ 28 | php7.2-exif \ 29 | php7.2-ftp \ 30 | php7.2-openssl \ 31 | php7.2-zip \ 32 | php7.2-sysvsem \ 33 | php7.2-sysvshm \ 34 | php7.2-sysvmsg \ 35 | php7.2-shmop \ 36 | php7.2-sockets \ 37 | php7.2-zlib \ 38 | php7.2-bz2 \ 39 | php7.2-curl \ 40 | php7.2-simplexml \ 41 | php7.2-xml \ 42 | php7.2-opcache \ 43 | php7.2-dom \ 44 | php7.2-xmlreader \ 45 | php7.2-xmlwriter \ 46 | php7.2-tokenizer \ 47 | php7.2-ctype \ 48 | php7.2-session \ 49 | php7.2-fileinfo \ 50 | php7.2-iconv \ 51 | php7.2-json \ 52 | php7.2-posix \ 53 | php7.2-apache2 \ 54 | curl \ 55 | ca-certificates \ 56 | runit \ 57 | apache2 \ 58 | " 59 | 60 | # PHP.earth Alpine repository for better developer experience 61 | ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub 62 | 63 | RUN set -x \ 64 | && echo "https://repos.php.earth/alpine/v3.9" >> /etc/apk/repositories \ 65 | && apk add --no-cache $DEPS \ 66 | && mkdir -p /run/apache2 \ 67 | && ln -sf /dev/stdout /var/log/apache2/access.log \ 68 | && ln -sf /dev/stderr /var/log/apache2/error.log 69 | 70 | COPY tags/apache / 71 | 72 | EXPOSE 80 73 | 74 | CMD ["/sbin/runit-wrapper"] 75 | -------------------------------------------------------------------------------- /docker/7.2-cgi.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.9 2 | 3 | ARG BUILD_DATE 4 | ARG VCS_REF 5 | 6 | LABEL org.label-schema.build-date=$BUILD_DATE \ 7 | org.label-schema.vcs-url="https://github.com/phpearth/docker-php.git" \ 8 | org.label-schema.vcs-ref=$VCS_REF \ 9 | org.label-schema.schema-version="1.0" \ 10 | org.label-schema.vendor="PHP.earth" \ 11 | org.label-schema.name="docker-php" \ 12 | org.label-schema.description="Docker For PHP Developers - Docker image with PHP CGI 7.2, and Alpine" \ 13 | org.label-schema.url="https://github.com/phpearth/docker-php" 14 | 15 | # PHP_INI_DIR to be symmetrical with official php docker image 16 | ENV PHP_INI_DIR /etc/php/7.2 17 | 18 | # When using Composer, disable the warning about running commands as root/super user 19 | ENV COMPOSER_ALLOW_SUPERUSER=1 20 | 21 | # Persistent runtime dependencies 22 | ARG DEPS="\ 23 | php7.2 \ 24 | php7.2-phar \ 25 | php7.2-bcmath \ 26 | php7.2-calendar \ 27 | php7.2-mbstring \ 28 | php7.2-exif \ 29 | php7.2-ftp \ 30 | php7.2-openssl \ 31 | php7.2-zip \ 32 | php7.2-sysvsem \ 33 | php7.2-sysvshm \ 34 | php7.2-sysvmsg \ 35 | php7.2-shmop \ 36 | php7.2-sockets \ 37 | php7.2-zlib \ 38 | php7.2-bz2 \ 39 | php7.2-curl \ 40 | php7.2-simplexml \ 41 | php7.2-xml \ 42 | php7.2-opcache \ 43 | php7.2-dom \ 44 | php7.2-xmlreader \ 45 | php7.2-xmlwriter \ 46 | php7.2-tokenizer \ 47 | php7.2-ctype \ 48 | php7.2-session \ 49 | php7.2-fileinfo \ 50 | php7.2-iconv \ 51 | php7.2-json \ 52 | php7.2-posix \ 53 | php7.2-cgi \ 54 | curl \ 55 | ca-certificates \ 56 | runit \ 57 | " 58 | 59 | # PHP.earth Alpine repository for better developer experience 60 | ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub 61 | 62 | RUN set -x \ 63 | && echo "https://repos.php.earth/alpine/v3.9" >> /etc/apk/repositories \ 64 | && apk add --no-cache $DEPS 65 | 66 | CMD ["php", "-a"] 67 | -------------------------------------------------------------------------------- /docker/7.2-cli.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.9 2 | 3 | ARG BUILD_DATE 4 | ARG VCS_REF 5 | 6 | LABEL org.label-schema.build-date=$BUILD_DATE \ 7 | org.label-schema.vcs-url="https://github.com/phpearth/docker-php.git" \ 8 | org.label-schema.vcs-ref=$VCS_REF \ 9 | org.label-schema.schema-version="1.0" \ 10 | org.label-schema.vendor="PHP.earth" \ 11 | org.label-schema.name="docker-php" \ 12 | org.label-schema.description="Docker For PHP Developers - Docker image with PHP CLI 7.2, additional PHP extensions, and Alpine" \ 13 | org.label-schema.url="https://github.com/phpearth/docker-php" 14 | 15 | # PHP_INI_DIR to be symmetrical with official php docker image 16 | ENV PHP_INI_DIR /etc/php/7.2 17 | 18 | # When using Composer, disable the warning about running commands as root/super user 19 | ENV COMPOSER_ALLOW_SUPERUSER=1 20 | 21 | # Persistent runtime dependencies 22 | ARG DEPS="\ 23 | php7.2 \ 24 | php7.2-phar \ 25 | php7.2-bcmath \ 26 | php7.2-calendar \ 27 | php7.2-mbstring \ 28 | php7.2-exif \ 29 | php7.2-ftp \ 30 | php7.2-openssl \ 31 | php7.2-zip \ 32 | php7.2-sysvsem \ 33 | php7.2-sysvshm \ 34 | php7.2-sysvmsg \ 35 | php7.2-shmop \ 36 | php7.2-sockets \ 37 | php7.2-zlib \ 38 | php7.2-bz2 \ 39 | php7.2-curl \ 40 | php7.2-simplexml \ 41 | php7.2-xml \ 42 | php7.2-opcache \ 43 | php7.2-dom \ 44 | php7.2-xmlreader \ 45 | php7.2-xmlwriter \ 46 | php7.2-tokenizer \ 47 | php7.2-ctype \ 48 | php7.2-session \ 49 | php7.2-fileinfo \ 50 | php7.2-iconv \ 51 | php7.2-json \ 52 | php7.2-posix \ 53 | curl \ 54 | ca-certificates \ 55 | " 56 | 57 | # PHP.earth Alpine repository for better developer experience 58 | ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub 59 | 60 | RUN set -x \ 61 | && echo "https://repos.php.earth/alpine/v3.9" >> /etc/apk/repositories \ 62 | && apk add --no-cache $DEPS 63 | 64 | CMD ["php", "-a"] 65 | -------------------------------------------------------------------------------- /docker/7.2-lighttpd.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.9 2 | 3 | ARG BUILD_DATE 4 | ARG VCS_REF 5 | 6 | LABEL org.label-schema.build-date=$BUILD_DATE \ 7 | org.label-schema.vcs-url="https://github.com/phpearth/docker-php.git" \ 8 | org.label-schema.vcs-ref=$VCS_REF \ 9 | org.label-schema.schema-version="1.0" \ 10 | org.label-schema.vendor="PHP.earth" \ 11 | org.label-schema.name="docker-php" \ 12 | org.label-schema.description="Docker For PHP Developers - Docker image with PHP 7.2, Lighttpd, and Alpine" \ 13 | org.label-schema.url="https://github.com/phpearth/docker-php" 14 | 15 | # PHP_INI_DIR to be symmetrical with official php docker image 16 | ENV PHP_INI_DIR /etc/php/7.2 17 | 18 | # When using Composer, disable the warning about running commands as root/super user 19 | ENV COMPOSER_ALLOW_SUPERUSER=1 20 | 21 | # Persistent runtime dependencies 22 | ARG DEPS="\ 23 | lighttpd \ 24 | php7.2 \ 25 | php7.2-phar \ 26 | php7.2-bcmath \ 27 | php7.2-calendar \ 28 | php7.2-mbstring \ 29 | php7.2-exif \ 30 | php7.2-ftp \ 31 | php7.2-openssl \ 32 | php7.2-zip \ 33 | php7.2-sysvsem \ 34 | php7.2-sysvshm \ 35 | php7.2-sysvmsg \ 36 | php7.2-shmop \ 37 | php7.2-sockets \ 38 | php7.2-zlib \ 39 | php7.2-bz2 \ 40 | php7.2-curl \ 41 | php7.2-simplexml \ 42 | php7.2-xml \ 43 | php7.2-opcache \ 44 | php7.2-dom \ 45 | php7.2-xmlreader \ 46 | php7.2-xmlwriter \ 47 | php7.2-tokenizer \ 48 | php7.2-ctype \ 49 | php7.2-session \ 50 | php7.2-fileinfo \ 51 | php7.2-iconv \ 52 | php7.2-json \ 53 | php7.2-posix \ 54 | php7.2-fpm \ 55 | curl \ 56 | ca-certificates \ 57 | runit \ 58 | " 59 | 60 | # PHP.earth Alpine repository for better developer experience 61 | ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub 62 | 63 | RUN set -x \ 64 | && echo "https://repos.php.earth/alpine/v3.9" >> /etc/apk/repositories \ 65 | && apk add --no-cache $DEPS 66 | 67 | COPY tags/lighttpd / 68 | 69 | EXPOSE 80 70 | 71 | CMD ["/sbin/runit-wrapper"] 72 | -------------------------------------------------------------------------------- /docker/7.2-litespeed.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.9 2 | 3 | ARG BUILD_DATE 4 | ARG VCS_REF 5 | 6 | LABEL org.label-schema.build-date=$BUILD_DATE \ 7 | org.label-schema.vcs-url="https://github.com/phpearth/docker-php.git" \ 8 | org.label-schema.vcs-ref=$VCS_REF \ 9 | org.label-schema.schema-version="1.0" \ 10 | org.label-schema.vendor="PHP.earth" \ 11 | org.label-schema.name="docker-php" \ 12 | org.label-schema.description="Docker For PHP Developers - Docker image with PHP 7.2, OpenLiteSpeed, and Alpine" \ 13 | org.label-schema.url="https://github.com/phpearth/docker-php" 14 | 15 | # PHP_INI_DIR to be symmetrical with official php docker image 16 | ENV PHP_INI_DIR /etc/php/7.2 17 | 18 | # When using Composer, disable the warning about running commands as root/super user 19 | ENV COMPOSER_ALLOW_SUPERUSER=1 20 | 21 | # Persistent runtime dependencies 22 | ARG DEPS="\ 23 | curl \ 24 | ca-certificates \ 25 | runit \ 26 | php7.2 \ 27 | php7.2-phar \ 28 | php7.2-bcmath \ 29 | php7.2-calendar \ 30 | php7.2-mbstring \ 31 | php7.2-exif \ 32 | php7.2-ftp \ 33 | php7.2-openssl \ 34 | php7.2-zip \ 35 | php7.2-sysvsem \ 36 | php7.2-sysvshm \ 37 | php7.2-sysvmsg \ 38 | php7.2-shmop \ 39 | php7.2-sockets \ 40 | php7.2-zlib \ 41 | php7.2-bz2 \ 42 | php7.2-curl \ 43 | php7.2-simplexml \ 44 | php7.2-xml \ 45 | php7.2-opcache \ 46 | php7.2-dom \ 47 | php7.2-xmlreader \ 48 | php7.2-xmlwriter \ 49 | php7.2-tokenizer \ 50 | php7.2-ctype \ 51 | php7.2-session \ 52 | php7.2-fileinfo \ 53 | php7.2-iconv \ 54 | php7.2-json \ 55 | php7.2-posix \ 56 | php7.2-litespeed \ 57 | litespeed \ 58 | " 59 | 60 | # PHP.earth Alpine repository for better developer experience 61 | ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub 62 | 63 | RUN set -x \ 64 | && echo "https://repos.php.earth/alpine/v3.9" >> /etc/apk/repositories \ 65 | && apk add --no-cache $DEPS \ 66 | && ln -sf /dev/stdout /var/lib/litespeed/logs/access.log \ 67 | && ln -sf /dev/stderr /var/lib/litespeed/logs/error.log 68 | 69 | COPY tags/litespeed / 70 | 71 | EXPOSE 8088 7080 72 | 73 | CMD ["/sbin/runit-wrapper"] 74 | -------------------------------------------------------------------------------- /docker/7.2-nginx.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.9 2 | 3 | ARG BUILD_DATE 4 | ARG VCS_REF 5 | 6 | LABEL org.label-schema.build-date=$BUILD_DATE \ 7 | org.label-schema.vcs-url="https://github.com/phpearth/docker-php.git" \ 8 | org.label-schema.vcs-ref=$VCS_REF \ 9 | org.label-schema.schema-version="1.0" \ 10 | org.label-schema.vendor="PHP.earth" \ 11 | org.label-schema.name="docker-php" \ 12 | org.label-schema.description="Docker For PHP Developers - Docker image with PHP 7.2, Nginx, and Alpine" \ 13 | org.label-schema.url="https://github.com/phpearth/docker-php" 14 | 15 | # PHP_INI_DIR to be symmetrical with official php docker image 16 | ENV PHP_INI_DIR /etc/php/7.2 17 | 18 | # When using Composer, disable the warning about running commands as root/super user 19 | ENV COMPOSER_ALLOW_SUPERUSER=1 20 | 21 | # Persistent runtime dependencies 22 | ARG DEPS="\ 23 | nginx \ 24 | nginx-mod-http-headers-more \ 25 | php7.2 \ 26 | php7.2-phar \ 27 | php7.2-bcmath \ 28 | php7.2-calendar \ 29 | php7.2-mbstring \ 30 | php7.2-exif \ 31 | php7.2-ftp \ 32 | php7.2-openssl \ 33 | php7.2-zip \ 34 | php7.2-sysvsem \ 35 | php7.2-sysvshm \ 36 | php7.2-sysvmsg \ 37 | php7.2-shmop \ 38 | php7.2-sockets \ 39 | php7.2-zlib \ 40 | php7.2-bz2 \ 41 | php7.2-curl \ 42 | php7.2-simplexml \ 43 | php7.2-xml \ 44 | php7.2-opcache \ 45 | php7.2-dom \ 46 | php7.2-xmlreader \ 47 | php7.2-xmlwriter \ 48 | php7.2-tokenizer \ 49 | php7.2-ctype \ 50 | php7.2-session \ 51 | php7.2-fileinfo \ 52 | php7.2-iconv \ 53 | php7.2-json \ 54 | php7.2-posix \ 55 | php7.2-fpm \ 56 | curl \ 57 | ca-certificates \ 58 | runit \ 59 | " 60 | 61 | # PHP.earth Alpine repository for better developer experience 62 | ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub 63 | 64 | RUN set -x \ 65 | && echo "https://repos.php.earth/alpine/v3.9" >> /etc/apk/repositories \ 66 | && apk add --no-cache $DEPS \ 67 | && ln -sf /dev/stdout /var/log/nginx/access.log \ 68 | && ln -sf /dev/stderr /var/log/nginx/error.log 69 | 70 | COPY tags/nginx / 71 | 72 | EXPOSE 80 73 | 74 | CMD ["/sbin/runit-wrapper"] 75 | -------------------------------------------------------------------------------- /docker/7.2.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.9 2 | 3 | ARG BUILD_DATE 4 | ARG VCS_REF 5 | 6 | LABEL org.label-schema.build-date=$BUILD_DATE \ 7 | org.label-schema.vcs-url="https://github.com/phpearth/docker-php.git" \ 8 | org.label-schema.vcs-ref=$VCS_REF \ 9 | org.label-schema.schema-version="1.0" \ 10 | org.label-schema.vendor="PHP.earth" \ 11 | org.label-schema.name="docker-php" \ 12 | org.label-schema.description="Docker For PHP Developers - Docker image with PHP CLI 7.2, and Alpine" \ 13 | org.label-schema.url="https://github.com/phpearth/docker-php" 14 | 15 | # PHP_INI_DIR to be symmetrical with official php docker image 16 | ENV PHP_INI_DIR /etc/php/7.2 17 | 18 | # When using Composer, disable the warning about running commands as root/super user 19 | ENV COMPOSER_ALLOW_SUPERUSER=1 20 | 21 | # Persistent runtime dependencies 22 | ARG DEPS="\ 23 | php7.2 \ 24 | curl \ 25 | ca-certificates \ 26 | " 27 | 28 | # PHP.earth Alpine repository for better developer experience 29 | ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub 30 | 31 | RUN set -x \ 32 | && echo "https://repos.php.earth/alpine/v3.9" >> /etc/apk/repositories \ 33 | && apk add --no-cache --virtual .build-deps $BUILD_DEPS \ 34 | && apk add --no-cache $DEPS 35 | 36 | CMD ["php", "-a"] 37 | -------------------------------------------------------------------------------- /docker/7.3-apache.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.9 2 | 3 | ARG BUILD_DATE 4 | ARG VCS_REF 5 | 6 | LABEL org.label-schema.build-date=$BUILD_DATE \ 7 | org.label-schema.vcs-url="https://github.com/phpearth/docker-php.git" \ 8 | org.label-schema.vcs-ref=$VCS_REF \ 9 | org.label-schema.schema-version="1.0" \ 10 | org.label-schema.vendor="PHP.earth" \ 11 | org.label-schema.name="docker-php" \ 12 | org.label-schema.description="Docker For PHP Developers - Docker image with PHP 7.3, Apache, and Alpine" \ 13 | org.label-schema.url="https://github.com/phpearth/docker-php" 14 | 15 | # PHP_INI_DIR to be symmetrical with official php docker image 16 | ENV PHP_INI_DIR /etc/php/7.3 17 | 18 | # When using Composer, disable the warning about running commands as root/super user 19 | ENV COMPOSER_ALLOW_SUPERUSER=1 20 | 21 | # Persistent runtime dependencies 22 | ARG DEPS="\ 23 | php7.3 \ 24 | php7.3-phar \ 25 | php7.3-bcmath \ 26 | php7.3-calendar \ 27 | php7.3-mbstring \ 28 | php7.3-exif \ 29 | php7.3-ftp \ 30 | php7.3-openssl \ 31 | php7.3-zip \ 32 | php7.3-sysvsem \ 33 | php7.3-sysvshm \ 34 | php7.3-sysvmsg \ 35 | php7.3-shmop \ 36 | php7.3-sockets \ 37 | php7.3-zlib \ 38 | php7.3-bz2 \ 39 | php7.3-curl \ 40 | php7.3-simplexml \ 41 | php7.3-xml \ 42 | php7.3-opcache \ 43 | php7.3-dom \ 44 | php7.3-xmlreader \ 45 | php7.3-xmlwriter \ 46 | php7.3-tokenizer \ 47 | php7.3-ctype \ 48 | php7.3-session \ 49 | php7.3-fileinfo \ 50 | php7.3-iconv \ 51 | php7.3-json \ 52 | php7.3-posix \ 53 | php7.3-apache2 \ 54 | curl \ 55 | ca-certificates \ 56 | runit \ 57 | apache2 \ 58 | " 59 | 60 | # PHP.earth Alpine repository for better developer experience 61 | ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub 62 | 63 | RUN set -x \ 64 | && echo "https://repos.php.earth/alpine/v3.9" >> /etc/apk/repositories \ 65 | && apk add --no-cache $DEPS \ 66 | && mkdir -p /run/apache2 \ 67 | && ln -sf /dev/stdout /var/log/apache2/access.log \ 68 | && ln -sf /dev/stderr /var/log/apache2/error.log 69 | 70 | COPY tags/apache / 71 | 72 | EXPOSE 80 73 | 74 | CMD ["/sbin/runit-wrapper"] 75 | -------------------------------------------------------------------------------- /docker/7.3-cgi.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.9 2 | 3 | ARG BUILD_DATE 4 | ARG VCS_REF 5 | 6 | LABEL org.label-schema.build-date=$BUILD_DATE \ 7 | org.label-schema.vcs-url="https://github.com/phpearth/docker-php.git" \ 8 | org.label-schema.vcs-ref=$VCS_REF \ 9 | org.label-schema.schema-version="1.0" \ 10 | org.label-schema.vendor="PHP.earth" \ 11 | org.label-schema.name="docker-php" \ 12 | org.label-schema.description="Docker For PHP Developers - Docker image with PHP CGI 7.3, and Alpine" \ 13 | org.label-schema.url="https://github.com/phpearth/docker-php" 14 | 15 | # PHP_INI_DIR to be symmetrical with official php docker image 16 | ENV PHP_INI_DIR /etc/php/7.3 17 | 18 | # When using Composer, disable the warning about running commands as root/super user 19 | ENV COMPOSER_ALLOW_SUPERUSER=1 20 | 21 | # Persistent runtime dependencies 22 | ARG DEPS="\ 23 | php7.3 \ 24 | php7.3-phar \ 25 | php7.3-bcmath \ 26 | php7.3-calendar \ 27 | php7.3-mbstring \ 28 | php7.3-exif \ 29 | php7.3-ftp \ 30 | php7.3-openssl \ 31 | php7.3-zip \ 32 | php7.3-sysvsem \ 33 | php7.3-sysvshm \ 34 | php7.3-sysvmsg \ 35 | php7.3-shmop \ 36 | php7.3-sockets \ 37 | php7.3-zlib \ 38 | php7.3-bz2 \ 39 | php7.3-curl \ 40 | php7.3-simplexml \ 41 | php7.3-xml \ 42 | php7.3-opcache \ 43 | php7.3-dom \ 44 | php7.3-xmlreader \ 45 | php7.3-xmlwriter \ 46 | php7.3-tokenizer \ 47 | php7.3-ctype \ 48 | php7.3-session \ 49 | php7.3-fileinfo \ 50 | php7.3-iconv \ 51 | php7.3-json \ 52 | php7.3-posix \ 53 | php7.3-cgi \ 54 | curl \ 55 | ca-certificates \ 56 | runit \ 57 | " 58 | 59 | # PHP.earth Alpine repository for better developer experience 60 | ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub 61 | 62 | RUN set -x \ 63 | && echo "https://repos.php.earth/alpine/v3.9" >> /etc/apk/repositories \ 64 | && apk add --no-cache $DEPS 65 | 66 | CMD ["php", "-a"] 67 | -------------------------------------------------------------------------------- /docker/7.3-cli.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.9 2 | 3 | ARG BUILD_DATE 4 | ARG VCS_REF 5 | 6 | LABEL org.label-schema.build-date=$BUILD_DATE \ 7 | org.label-schema.vcs-url="https://github.com/phpearth/docker-php.git" \ 8 | org.label-schema.vcs-ref=$VCS_REF \ 9 | org.label-schema.schema-version="1.0" \ 10 | org.label-schema.vendor="PHP.earth" \ 11 | org.label-schema.name="docker-php" \ 12 | org.label-schema.description="Docker For PHP Developers - Docker image with PHP CLI 7.3, additional PHP extensions, and Alpine" \ 13 | org.label-schema.url="https://github.com/phpearth/docker-php" 14 | 15 | # PHP_INI_DIR to be symmetrical with official php docker image 16 | ENV PHP_INI_DIR /etc/php/7.3 17 | 18 | # When using Composer, disable the warning about running commands as root/super user 19 | ENV COMPOSER_ALLOW_SUPERUSER=1 20 | 21 | # Persistent runtime dependencies 22 | ARG DEPS="\ 23 | php7.3 \ 24 | php7.3-phar \ 25 | php7.3-bcmath \ 26 | php7.3-calendar \ 27 | php7.3-mbstring \ 28 | php7.3-exif \ 29 | php7.3-ftp \ 30 | php7.3-openssl \ 31 | php7.3-zip \ 32 | php7.3-sysvsem \ 33 | php7.3-sysvshm \ 34 | php7.3-sysvmsg \ 35 | php7.3-shmop \ 36 | php7.3-sockets \ 37 | php7.3-zlib \ 38 | php7.3-bz2 \ 39 | php7.3-curl \ 40 | php7.3-simplexml \ 41 | php7.3-xml \ 42 | php7.3-opcache \ 43 | php7.3-dom \ 44 | php7.3-xmlreader \ 45 | php7.3-xmlwriter \ 46 | php7.3-tokenizer \ 47 | php7.3-ctype \ 48 | php7.3-session \ 49 | php7.3-fileinfo \ 50 | php7.3-iconv \ 51 | php7.3-json \ 52 | php7.3-posix \ 53 | curl \ 54 | ca-certificates \ 55 | " 56 | 57 | # PHP.earth Alpine repository for better developer experience 58 | ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub 59 | 60 | RUN set -x \ 61 | && echo "https://repos.php.earth/alpine/v3.9" >> /etc/apk/repositories \ 62 | && apk add --no-cache $DEPS 63 | 64 | CMD ["php", "-a"] 65 | -------------------------------------------------------------------------------- /docker/7.3-lighttpd.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.9 2 | 3 | ARG BUILD_DATE 4 | ARG VCS_REF 5 | 6 | LABEL org.label-schema.build-date=$BUILD_DATE \ 7 | org.label-schema.vcs-url="https://github.com/phpearth/docker-php.git" \ 8 | org.label-schema.vcs-ref=$VCS_REF \ 9 | org.label-schema.schema-version="1.0" \ 10 | org.label-schema.vendor="PHP.earth" \ 11 | org.label-schema.name="docker-php" \ 12 | org.label-schema.description="Docker For PHP Developers - Docker image with PHP 7.3, Lighttpd, and Alpine" \ 13 | org.label-schema.url="https://github.com/phpearth/docker-php" 14 | 15 | # PHP_INI_DIR to be symmetrical with official php docker image 16 | ENV PHP_INI_DIR /etc/php/7.3 17 | 18 | # When using Composer, disable the warning about running commands as root/super user 19 | ENV COMPOSER_ALLOW_SUPERUSER=1 20 | 21 | # Persistent runtime dependencies 22 | ARG DEPS="\ 23 | lighttpd \ 24 | php7.3 \ 25 | php7.3-phar \ 26 | php7.3-bcmath \ 27 | php7.3-calendar \ 28 | php7.3-mbstring \ 29 | php7.3-exif \ 30 | php7.3-ftp \ 31 | php7.3-openssl \ 32 | php7.3-zip \ 33 | php7.3-sysvsem \ 34 | php7.3-sysvshm \ 35 | php7.3-sysvmsg \ 36 | php7.3-shmop \ 37 | php7.3-sockets \ 38 | php7.3-zlib \ 39 | php7.3-bz2 \ 40 | php7.3-curl \ 41 | php7.3-simplexml \ 42 | php7.3-xml \ 43 | php7.3-opcache \ 44 | php7.3-dom \ 45 | php7.3-xmlreader \ 46 | php7.3-xmlwriter \ 47 | php7.3-tokenizer \ 48 | php7.3-ctype \ 49 | php7.3-session \ 50 | php7.3-fileinfo \ 51 | php7.3-iconv \ 52 | php7.3-json \ 53 | php7.3-posix \ 54 | php7.3-fpm \ 55 | curl \ 56 | ca-certificates \ 57 | runit \ 58 | " 59 | 60 | # PHP.earth Alpine repository for better developer experience 61 | ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub 62 | 63 | RUN set -x \ 64 | && echo "https://repos.php.earth/alpine/v3.9" >> /etc/apk/repositories \ 65 | && apk add --no-cache $DEPS 66 | 67 | COPY tags/lighttpd / 68 | 69 | EXPOSE 80 70 | 71 | CMD ["/sbin/runit-wrapper"] 72 | -------------------------------------------------------------------------------- /docker/7.3-litespeed.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.9 2 | 3 | ARG BUILD_DATE 4 | ARG VCS_REF 5 | 6 | LABEL org.label-schema.build-date=$BUILD_DATE \ 7 | org.label-schema.vcs-url="https://github.com/phpearth/docker-php.git" \ 8 | org.label-schema.vcs-ref=$VCS_REF \ 9 | org.label-schema.schema-version="1.0" \ 10 | org.label-schema.vendor="PHP.earth" \ 11 | org.label-schema.name="docker-php" \ 12 | org.label-schema.description="Docker For PHP Developers - Docker image with PHP 7.3, OpenLiteSpeed, and Alpine" \ 13 | org.label-schema.url="https://github.com/phpearth/docker-php" 14 | 15 | # PHP_INI_DIR to be symmetrical with official php docker image 16 | ENV PHP_INI_DIR /etc/php/7.3 17 | 18 | # When using Composer, disable the warning about running commands as root/super user 19 | ENV COMPOSER_ALLOW_SUPERUSER=1 20 | 21 | # Persistent runtime dependencies 22 | ARG DEPS="\ 23 | curl \ 24 | ca-certificates \ 25 | runit \ 26 | php7.3 \ 27 | php7.3-phar \ 28 | php7.3-bcmath \ 29 | php7.3-calendar \ 30 | php7.3-mbstring \ 31 | php7.3-exif \ 32 | php7.3-ftp \ 33 | php7.3-openssl \ 34 | php7.3-zip \ 35 | php7.3-sysvsem \ 36 | php7.3-sysvshm \ 37 | php7.3-sysvmsg \ 38 | php7.3-shmop \ 39 | php7.3-sockets \ 40 | php7.3-zlib \ 41 | php7.3-bz2 \ 42 | php7.3-curl \ 43 | php7.3-simplexml \ 44 | php7.3-xml \ 45 | php7.3-opcache \ 46 | php7.3-dom \ 47 | php7.3-xmlreader \ 48 | php7.3-xmlwriter \ 49 | php7.3-tokenizer \ 50 | php7.3-ctype \ 51 | php7.3-session \ 52 | php7.3-fileinfo \ 53 | php7.3-iconv \ 54 | php7.3-json \ 55 | php7.3-posix \ 56 | php7.3-litespeed \ 57 | litespeed \ 58 | " 59 | 60 | # PHP.earth Alpine repository for better developer experience 61 | ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub 62 | 63 | RUN set -x \ 64 | && echo "https://repos.php.earth/alpine/v3.9" >> /etc/apk/repositories \ 65 | && apk add --no-cache $DEPS \ 66 | && ln -sf /dev/stdout /var/lib/litespeed/logs/access.log \ 67 | && ln -sf /dev/stderr /var/lib/litespeed/logs/error.log 68 | 69 | COPY tags/litespeed / 70 | 71 | EXPOSE 8088 7080 72 | 73 | CMD ["/sbin/runit-wrapper"] 74 | -------------------------------------------------------------------------------- /docker/7.3-nginx.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.9 2 | 3 | ARG BUILD_DATE 4 | ARG VCS_REF 5 | 6 | LABEL org.label-schema.build-date=$BUILD_DATE \ 7 | org.label-schema.vcs-url="https://github.com/phpearth/docker-php.git" \ 8 | org.label-schema.vcs-ref=$VCS_REF \ 9 | org.label-schema.schema-version="1.0" \ 10 | org.label-schema.vendor="PHP.earth" \ 11 | org.label-schema.name="docker-php" \ 12 | org.label-schema.description="Docker For PHP Developers - Docker image with PHP 7.3, Nginx, and Alpine" \ 13 | org.label-schema.url="https://github.com/phpearth/docker-php" 14 | 15 | # PHP_INI_DIR to be symmetrical with official php docker image 16 | ENV PHP_INI_DIR /etc/php/7.3 17 | 18 | # When using Composer, disable the warning about running commands as root/super user 19 | ENV COMPOSER_ALLOW_SUPERUSER=1 20 | 21 | # Persistent runtime dependencies 22 | ARG DEPS="\ 23 | nginx \ 24 | nginx-mod-http-headers-more \ 25 | php7.3 \ 26 | php7.3-phar \ 27 | php7.3-bcmath \ 28 | php7.3-calendar \ 29 | php7.3-mbstring \ 30 | php7.3-exif \ 31 | php7.3-ftp \ 32 | php7.3-openssl \ 33 | php7.3-zip \ 34 | php7.3-sysvsem \ 35 | php7.3-sysvshm \ 36 | php7.3-sysvmsg \ 37 | php7.3-shmop \ 38 | php7.3-sockets \ 39 | php7.3-zlib \ 40 | php7.3-bz2 \ 41 | php7.3-curl \ 42 | php7.3-simplexml \ 43 | php7.3-xml \ 44 | php7.3-opcache \ 45 | php7.3-dom \ 46 | php7.3-xmlreader \ 47 | php7.3-xmlwriter \ 48 | php7.3-tokenizer \ 49 | php7.3-ctype \ 50 | php7.3-session \ 51 | php7.3-fileinfo \ 52 | php7.3-iconv \ 53 | php7.3-json \ 54 | php7.3-posix \ 55 | php7.3-fpm \ 56 | curl \ 57 | ca-certificates \ 58 | runit \ 59 | " 60 | 61 | # PHP.earth Alpine repository for better developer experience 62 | ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub 63 | 64 | RUN set -x \ 65 | && echo "https://repos.php.earth/alpine/v3.9" >> /etc/apk/repositories \ 66 | && apk add --no-cache $DEPS \ 67 | && ln -sf /dev/stdout /var/log/nginx/access.log \ 68 | && ln -sf /dev/stderr /var/log/nginx/error.log 69 | 70 | COPY tags/nginx / 71 | 72 | EXPOSE 80 73 | 74 | CMD ["/sbin/runit-wrapper"] 75 | -------------------------------------------------------------------------------- /docker/7.3.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.9 2 | 3 | ARG BUILD_DATE 4 | ARG VCS_REF 5 | 6 | LABEL org.label-schema.build-date=$BUILD_DATE \ 7 | org.label-schema.vcs-url="https://github.com/phpearth/docker-php.git" \ 8 | org.label-schema.vcs-ref=$VCS_REF \ 9 | org.label-schema.schema-version="1.0" \ 10 | org.label-schema.vendor="PHP.earth" \ 11 | org.label-schema.name="docker-php" \ 12 | org.label-schema.description="Docker For PHP Developers - Docker image with PHP CLI 7.3, and Alpine" \ 13 | org.label-schema.url="https://github.com/phpearth/docker-php" 14 | 15 | # PHP_INI_DIR to be symmetrical with official php docker image 16 | ENV PHP_INI_DIR /etc/php/7.3 17 | 18 | # When using Composer, disable the warning about running commands as root/super user 19 | ENV COMPOSER_ALLOW_SUPERUSER=1 20 | 21 | # Persistent runtime dependencies 22 | ARG DEPS="\ 23 | php7.3 \ 24 | curl \ 25 | ca-certificates \ 26 | " 27 | 28 | # PHP.earth Alpine repository for better developer experience 29 | ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub 30 | 31 | RUN set -x \ 32 | && echo "https://repos.php.earth/alpine/v3.9" >> /etc/apk/repositories \ 33 | && apk add --no-cache --virtual .build-deps $BUILD_DEPS \ 34 | && apk add --no-cache $DEPS 35 | 36 | CMD ["php", "-a"] 37 | -------------------------------------------------------------------------------- /docker/7.4-apache.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.9 2 | 3 | ARG BUILD_DATE 4 | ARG VCS_REF 5 | 6 | LABEL org.label-schema.build-date=$BUILD_DATE \ 7 | org.label-schema.vcs-url="https://github.com/phpearth/docker-php.git" \ 8 | org.label-schema.vcs-ref=$VCS_REF \ 9 | org.label-schema.schema-version="1.0" \ 10 | org.label-schema.vendor="PHP.earth" \ 11 | org.label-schema.name="docker-php" \ 12 | org.label-schema.description="Docker For PHP Developers - Docker image with PHP 7.4, Apache, and Alpine" \ 13 | org.label-schema.url="https://github.com/phpearth/docker-php" 14 | 15 | # PHP_INI_DIR to be symmetrical with official php docker image 16 | ENV PHP_INI_DIR /etc/php/7.4 17 | 18 | # When using Composer, disable the warning about running commands as root/super user 19 | ENV COMPOSER_ALLOW_SUPERUSER=1 20 | 21 | # Persistent runtime dependencies 22 | ARG DEPS="\ 23 | php7.4 \ 24 | php7.4-phar \ 25 | php7.4-bcmath \ 26 | php7.4-calendar \ 27 | php7.4-mbstring \ 28 | php7.4-exif \ 29 | php7.4-ftp \ 30 | php7.4-openssl \ 31 | php7.4-zip \ 32 | php7.4-sysvsem \ 33 | php7.4-sysvshm \ 34 | php7.4-sysvmsg \ 35 | php7.4-shmop \ 36 | php7.4-sockets \ 37 | php7.4-zlib \ 38 | php7.4-bz2 \ 39 | php7.4-curl \ 40 | php7.4-simplexml \ 41 | php7.4-xml \ 42 | php7.4-opcache \ 43 | php7.4-dom \ 44 | php7.4-xmlreader \ 45 | php7.4-xmlwriter \ 46 | php7.4-tokenizer \ 47 | php7.4-ctype \ 48 | php7.4-session \ 49 | php7.4-fileinfo \ 50 | php7.4-iconv \ 51 | php7.4-json \ 52 | php7.4-posix \ 53 | php7.4-apache2 \ 54 | curl \ 55 | ca-certificates \ 56 | runit \ 57 | apache2 \ 58 | " 59 | 60 | # PHP.earth Alpine repository for better developer experience 61 | ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub 62 | 63 | RUN set -x \ 64 | && echo "https://repos.php.earth/alpine/v3.9" >> /etc/apk/repositories \ 65 | && apk add --no-cache $DEPS \ 66 | && mkdir -p /run/apache2 \ 67 | && ln -sf /dev/stdout /var/log/apache2/access.log \ 68 | && ln -sf /dev/stderr /var/log/apache2/error.log 69 | 70 | COPY tags/apache / 71 | 72 | EXPOSE 80 73 | 74 | CMD ["/sbin/runit-wrapper"] 75 | -------------------------------------------------------------------------------- /docker/7.4-cgi.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.9 2 | 3 | ARG BUILD_DATE 4 | ARG VCS_REF 5 | 6 | LABEL org.label-schema.build-date=$BUILD_DATE \ 7 | org.label-schema.vcs-url="https://github.com/phpearth/docker-php.git" \ 8 | org.label-schema.vcs-ref=$VCS_REF \ 9 | org.label-schema.schema-version="1.0" \ 10 | org.label-schema.vendor="PHP.earth" \ 11 | org.label-schema.name="docker-php" \ 12 | org.label-schema.description="Docker For PHP Developers - Docker image with PHP CGI 7.4, and Alpine" \ 13 | org.label-schema.url="https://github.com/phpearth/docker-php" 14 | 15 | # PHP_INI_DIR to be symmetrical with official php docker image 16 | ENV PHP_INI_DIR /etc/php/7.4 17 | 18 | # When using Composer, disable the warning about running commands as root/super user 19 | ENV COMPOSER_ALLOW_SUPERUSER=1 20 | 21 | # Persistent runtime dependencies 22 | ARG DEPS="\ 23 | php7.4 \ 24 | php7.4-phar \ 25 | php7.4-bcmath \ 26 | php7.4-calendar \ 27 | php7.4-mbstring \ 28 | php7.4-exif \ 29 | php7.4-ftp \ 30 | php7.4-openssl \ 31 | php7.4-zip \ 32 | php7.4-sysvsem \ 33 | php7.4-sysvshm \ 34 | php7.4-sysvmsg \ 35 | php7.4-shmop \ 36 | php7.4-sockets \ 37 | php7.4-zlib \ 38 | php7.4-bz2 \ 39 | php7.4-curl \ 40 | php7.4-simplexml \ 41 | php7.4-xml \ 42 | php7.4-opcache \ 43 | php7.4-dom \ 44 | php7.4-xmlreader \ 45 | php7.4-xmlwriter \ 46 | php7.4-tokenizer \ 47 | php7.4-ctype \ 48 | php7.4-session \ 49 | php7.4-fileinfo \ 50 | php7.4-iconv \ 51 | php7.4-json \ 52 | php7.4-posix \ 53 | php7.4-cgi \ 54 | curl \ 55 | ca-certificates \ 56 | runit \ 57 | " 58 | 59 | # PHP.earth Alpine repository for better developer experience 60 | ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub 61 | 62 | RUN set -x \ 63 | && echo "https://repos.php.earth/alpine/v3.9" >> /etc/apk/repositories \ 64 | && apk add --no-cache $DEPS 65 | 66 | CMD ["php", "-a"] 67 | -------------------------------------------------------------------------------- /docker/7.4-cli.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.9 2 | 3 | ARG BUILD_DATE 4 | ARG VCS_REF 5 | 6 | LABEL org.label-schema.build-date=$BUILD_DATE \ 7 | org.label-schema.vcs-url="https://github.com/phpearth/docker-php.git" \ 8 | org.label-schema.vcs-ref=$VCS_REF \ 9 | org.label-schema.schema-version="1.0" \ 10 | org.label-schema.vendor="PHP.earth" \ 11 | org.label-schema.name="docker-php" \ 12 | org.label-schema.description="Docker For PHP Developers - Docker image with PHP CLI 7.4, additional PHP extensions, and Alpine" \ 13 | org.label-schema.url="https://github.com/phpearth/docker-php" 14 | 15 | # PHP_INI_DIR to be symmetrical with official php docker image 16 | ENV PHP_INI_DIR /etc/php/7.4 17 | 18 | # When using Composer, disable the warning about running commands as root/super user 19 | ENV COMPOSER_ALLOW_SUPERUSER=1 20 | 21 | # Persistent runtime dependencies 22 | ARG DEPS="\ 23 | php7.4 \ 24 | php7.4-phar \ 25 | php7.4-bcmath \ 26 | php7.4-calendar \ 27 | php7.4-mbstring \ 28 | php7.4-exif \ 29 | php7.4-ftp \ 30 | php7.4-openssl \ 31 | php7.4-zip \ 32 | php7.4-sysvsem \ 33 | php7.4-sysvshm \ 34 | php7.4-sysvmsg \ 35 | php7.4-shmop \ 36 | php7.4-sockets \ 37 | php7.4-zlib \ 38 | php7.4-bz2 \ 39 | php7.4-curl \ 40 | php7.4-simplexml \ 41 | php7.4-xml \ 42 | php7.4-opcache \ 43 | php7.4-dom \ 44 | php7.4-xmlreader \ 45 | php7.4-xmlwriter \ 46 | php7.4-tokenizer \ 47 | php7.4-ctype \ 48 | php7.4-session \ 49 | php7.4-fileinfo \ 50 | php7.4-iconv \ 51 | php7.4-json \ 52 | php7.4-posix \ 53 | curl \ 54 | ca-certificates \ 55 | " 56 | 57 | # PHP.earth Alpine repository for better developer experience 58 | ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub 59 | 60 | RUN set -x \ 61 | && echo "https://repos.php.earth/alpine/v3.9" >> /etc/apk/repositories \ 62 | && apk add --no-cache $DEPS 63 | 64 | CMD ["php", "-a"] 65 | -------------------------------------------------------------------------------- /docker/7.4-lighttpd.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.9 2 | 3 | ARG BUILD_DATE 4 | ARG VCS_REF 5 | 6 | LABEL org.label-schema.build-date=$BUILD_DATE \ 7 | org.label-schema.vcs-url="https://github.com/phpearth/docker-php.git" \ 8 | org.label-schema.vcs-ref=$VCS_REF \ 9 | org.label-schema.schema-version="1.0" \ 10 | org.label-schema.vendor="PHP.earth" \ 11 | org.label-schema.name="docker-php" \ 12 | org.label-schema.description="Docker For PHP Developers - Docker image with PHP 7.4, Lighttpd, and Alpine" \ 13 | org.label-schema.url="https://github.com/phpearth/docker-php" 14 | 15 | # PHP_INI_DIR to be symmetrical with official php docker image 16 | ENV PHP_INI_DIR /etc/php/7.4 17 | 18 | # When using Composer, disable the warning about running commands as root/super user 19 | ENV COMPOSER_ALLOW_SUPERUSER=1 20 | 21 | # Persistent runtime dependencies 22 | ARG DEPS="\ 23 | lighttpd \ 24 | php7.4 \ 25 | php7.4-phar \ 26 | php7.4-bcmath \ 27 | php7.4-calendar \ 28 | php7.4-mbstring \ 29 | php7.4-exif \ 30 | php7.4-ftp \ 31 | php7.4-openssl \ 32 | php7.4-zip \ 33 | php7.4-sysvsem \ 34 | php7.4-sysvshm \ 35 | php7.4-sysvmsg \ 36 | php7.4-shmop \ 37 | php7.4-sockets \ 38 | php7.4-zlib \ 39 | php7.4-bz2 \ 40 | php7.4-curl \ 41 | php7.4-simplexml \ 42 | php7.4-xml \ 43 | php7.4-opcache \ 44 | php7.4-dom \ 45 | php7.4-xmlreader \ 46 | php7.4-xmlwriter \ 47 | php7.4-tokenizer \ 48 | php7.4-ctype \ 49 | php7.4-session \ 50 | php7.4-fileinfo \ 51 | php7.4-iconv \ 52 | php7.4-json \ 53 | php7.4-posix \ 54 | php7.4-fpm \ 55 | curl \ 56 | ca-certificates \ 57 | runit \ 58 | " 59 | 60 | # PHP.earth Alpine repository for better developer experience 61 | ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub 62 | 63 | RUN set -x \ 64 | && echo "https://repos.php.earth/alpine/v3.9" >> /etc/apk/repositories \ 65 | && apk add --no-cache $DEPS 66 | 67 | COPY tags/lighttpd / 68 | 69 | EXPOSE 80 70 | 71 | CMD ["/sbin/runit-wrapper"] 72 | -------------------------------------------------------------------------------- /docker/7.4-litespeed.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.9 2 | 3 | ARG BUILD_DATE 4 | ARG VCS_REF 5 | 6 | LABEL org.label-schema.build-date=$BUILD_DATE \ 7 | org.label-schema.vcs-url="https://github.com/phpearth/docker-php.git" \ 8 | org.label-schema.vcs-ref=$VCS_REF \ 9 | org.label-schema.schema-version="1.0" \ 10 | org.label-schema.vendor="PHP.earth" \ 11 | org.label-schema.name="docker-php" \ 12 | org.label-schema.description="Docker For PHP Developers - Docker image with PHP 7.4, OpenLiteSpeed, and Alpine" \ 13 | org.label-schema.url="https://github.com/phpearth/docker-php" 14 | 15 | # PHP_INI_DIR to be symmetrical with official php docker image 16 | ENV PHP_INI_DIR /etc/php/7.4 17 | 18 | # When using Composer, disable the warning about running commands as root/super user 19 | ENV COMPOSER_ALLOW_SUPERUSER=1 20 | 21 | # Persistent runtime dependencies 22 | ARG DEPS="\ 23 | curl \ 24 | ca-certificates \ 25 | runit \ 26 | php7.4 \ 27 | php7.4-phar \ 28 | php7.4-bcmath \ 29 | php7.4-calendar \ 30 | php7.4-mbstring \ 31 | php7.4-exif \ 32 | php7.4-ftp \ 33 | php7.4-openssl \ 34 | php7.4-zip \ 35 | php7.4-sysvsem \ 36 | php7.4-sysvshm \ 37 | php7.4-sysvmsg \ 38 | php7.4-shmop \ 39 | php7.4-sockets \ 40 | php7.4-zlib \ 41 | php7.4-bz2 \ 42 | php7.4-curl \ 43 | php7.4-simplexml \ 44 | php7.4-xml \ 45 | php7.4-opcache \ 46 | php7.4-dom \ 47 | php7.4-xmlreader \ 48 | php7.4-xmlwriter \ 49 | php7.4-tokenizer \ 50 | php7.4-ctype \ 51 | php7.4-session \ 52 | php7.4-fileinfo \ 53 | php7.4-iconv \ 54 | php7.4-json \ 55 | php7.4-posix \ 56 | php7.4-litespeed \ 57 | litespeed \ 58 | " 59 | 60 | # PHP.earth Alpine repository for better developer experience 61 | ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub 62 | 63 | RUN set -x \ 64 | && echo "https://repos.php.earth/alpine/v3.9" >> /etc/apk/repositories \ 65 | && apk add --no-cache $DEPS \ 66 | && ln -sf /dev/stdout /var/lib/litespeed/logs/access.log \ 67 | && ln -sf /dev/stderr /var/lib/litespeed/logs/error.log 68 | 69 | COPY tags/litespeed / 70 | 71 | EXPOSE 8088 7080 72 | 73 | CMD ["/sbin/runit-wrapper"] 74 | -------------------------------------------------------------------------------- /docker/7.4-nginx.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.9 2 | 3 | ARG BUILD_DATE 4 | ARG VCS_REF 5 | 6 | LABEL org.label-schema.build-date=$BUILD_DATE \ 7 | org.label-schema.vcs-url="https://github.com/phpearth/docker-php.git" \ 8 | org.label-schema.vcs-ref=$VCS_REF \ 9 | org.label-schema.schema-version="1.0" \ 10 | org.label-schema.vendor="PHP.earth" \ 11 | org.label-schema.name="docker-php" \ 12 | org.label-schema.description="Docker For PHP Developers - Docker image with PHP 7.4, Nginx, and Alpine" \ 13 | org.label-schema.url="https://github.com/phpearth/docker-php" 14 | 15 | # PHP_INI_DIR to be symmetrical with official php docker image 16 | ENV PHP_INI_DIR /etc/php/7.4 17 | 18 | # When using Composer, disable the warning about running commands as root/super user 19 | ENV COMPOSER_ALLOW_SUPERUSER=1 20 | 21 | # Persistent runtime dependencies 22 | ARG DEPS="\ 23 | nginx \ 24 | nginx-mod-http-headers-more \ 25 | php7.4 \ 26 | php7.4-phar \ 27 | php7.4-bcmath \ 28 | php7.4-calendar \ 29 | php7.4-mbstring \ 30 | php7.4-exif \ 31 | php7.4-ftp \ 32 | php7.4-openssl \ 33 | php7.4-zip \ 34 | php7.4-sysvsem \ 35 | php7.4-sysvshm \ 36 | php7.4-sysvmsg \ 37 | php7.4-shmop \ 38 | php7.4-sockets \ 39 | php7.4-zlib \ 40 | php7.4-bz2 \ 41 | php7.4-curl \ 42 | php7.4-simplexml \ 43 | php7.4-xml \ 44 | php7.4-opcache \ 45 | php7.4-dom \ 46 | php7.4-xmlreader \ 47 | php7.4-xmlwriter \ 48 | php7.4-tokenizer \ 49 | php7.4-ctype \ 50 | php7.4-session \ 51 | php7.4-fileinfo \ 52 | php7.4-iconv \ 53 | php7.4-json \ 54 | php7.4-posix \ 55 | php7.4-fpm \ 56 | curl \ 57 | ca-certificates \ 58 | runit \ 59 | " 60 | 61 | # PHP.earth Alpine repository for better developer experience 62 | ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub 63 | 64 | RUN set -x \ 65 | && echo "https://repos.php.earth/alpine/v3.9" >> /etc/apk/repositories \ 66 | && apk add --no-cache $DEPS \ 67 | && ln -sf /dev/stdout /var/log/nginx/access.log \ 68 | && ln -sf /dev/stderr /var/log/nginx/error.log 69 | 70 | COPY tags/nginx / 71 | 72 | EXPOSE 80 73 | 74 | CMD ["/sbin/runit-wrapper"] 75 | -------------------------------------------------------------------------------- /docker/7.4.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.9 2 | 3 | ARG BUILD_DATE 4 | ARG VCS_REF 5 | 6 | LABEL org.label-schema.build-date=$BUILD_DATE \ 7 | org.label-schema.vcs-url="https://github.com/phpearth/docker-php.git" \ 8 | org.label-schema.vcs-ref=$VCS_REF \ 9 | org.label-schema.schema-version="1.0" \ 10 | org.label-schema.vendor="PHP.earth" \ 11 | org.label-schema.name="docker-php" \ 12 | org.label-schema.description="Docker For PHP Developers - Docker image with PHP CLI 7.4, and Alpine" \ 13 | org.label-schema.url="https://github.com/phpearth/docker-php" 14 | 15 | # PHP_INI_DIR to be symmetrical with official php docker image 16 | ENV PHP_INI_DIR /etc/php/7.4 17 | 18 | # When using Composer, disable the warning about running commands as root/super user 19 | ENV COMPOSER_ALLOW_SUPERUSER=1 20 | 21 | # Persistent runtime dependencies 22 | ARG DEPS="\ 23 | php7.4 \ 24 | curl \ 25 | ca-certificates \ 26 | " 27 | 28 | # PHP.earth Alpine repository for better developer experience 29 | ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub 30 | 31 | RUN set -x \ 32 | && echo "https://repos.php.earth/alpine/v3.9" >> /etc/apk/repositories \ 33 | && apk add --no-cache --virtual .build-deps $BUILD_DEPS \ 34 | && apk add --no-cache $DEPS 35 | 36 | CMD ["php", "-a"] 37 | -------------------------------------------------------------------------------- /docker/hooks/build: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | TAG=$(echo $IMAGE_NAME| cut -d':' -f 2) 4 | 5 | echo "Build hook running" 6 | docker build --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ 7 | --build-arg VCS_REF=`git rev-parse --short HEAD` \ 8 | -t $IMAGE_NAME -f $TAG.Dockerfile . 9 | -------------------------------------------------------------------------------- /docker/hooks/post_push: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | TAG=$(echo $IMAGE_NAME| cut -d':' -f 2) 4 | 5 | if [ "$TAG" == "7.3" ]; then 6 | docker tag $IMAGE_NAME $DOCKER_REPO:latest 7 | docker push $DOCKER_REPO:latest 8 | fi 9 | -------------------------------------------------------------------------------- /docker/tags/apache/etc/service/apache/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | exec 2>&1 4 | source /env 5 | 6 | exec /usr/sbin/httpd -D FOREGROUND 7 | -------------------------------------------------------------------------------- /docker/tags/apache/sbin/runit-wrapper: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | main() { 4 | # Dump environment 5 | export > /env 6 | 7 | trap onterm SIGTERM SIGINT 8 | 9 | echo "Starting runit" 10 | /sbin/runsvdir-start & 11 | wait "$!" 12 | } 13 | 14 | onterm() { 15 | echo "Exiting..." 16 | pkill -SIGHUP runsvdir-start 17 | exit $? 18 | } 19 | 20 | main "$@" 21 | -------------------------------------------------------------------------------- /docker/tags/apache/sbin/runsvdir-start: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export PATH=/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin 4 | 5 | exec runsvdir -P /etc/service 6 | -------------------------------------------------------------------------------- /docker/tags/lighttpd/etc/lighttpd/example.conf: -------------------------------------------------------------------------------- 1 | server.document-root = "/var/www/localhost/htdocs/" 2 | 3 | server.port = 80 4 | 5 | server.username = "lighttpd" 6 | server.groupname = "lighttpd" 7 | 8 | mimetype.assign = ( 9 | ".html" => "text/html", 10 | ".txt" => "text/plain", 11 | ".jpg" => "image/jpeg", 12 | ".png" => "image/png" 13 | ) 14 | 15 | static-file.exclude-extensions = ( ".fcgi", ".php", ".rb", "~", ".inc" ) 16 | index-file.names = ( "index.html", "index.php" ) 17 | 18 | server.modules += ( "mod_fastcgi" ) 19 | fastcgi.server = ( ".php" => 20 | ("localhost" => 21 | ( 22 | "socket" => "/run/php/php-fpm.sock" 23 | ) 24 | ) 25 | ) 26 | -------------------------------------------------------------------------------- /docker/tags/lighttpd/etc/service/lighttpd/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | exec 2>&1 4 | source /env 5 | 6 | exec /usr/sbin/lighttpd -D -f /etc/lighttpd/example.conf 7 | -------------------------------------------------------------------------------- /docker/tags/lighttpd/etc/service/php-fpm/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | exec 2>&1 4 | source /env 5 | 6 | exec php-fpm --nodaemonize 7 | -------------------------------------------------------------------------------- /docker/tags/lighttpd/sbin/runit-wrapper: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | main() { 4 | # Dump environment 5 | export > /env 6 | 7 | trap onterm SIGTERM SIGINT 8 | 9 | echo "Starting runit" 10 | /sbin/runsvdir-start & 11 | wait "$!" 12 | } 13 | 14 | onterm() { 15 | echo "Exiting..." 16 | pkill -SIGHUP runsvdir-start 17 | exit $? 18 | } 19 | 20 | main "$@" 21 | -------------------------------------------------------------------------------- /docker/tags/lighttpd/sbin/runsvdir-start: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export PATH=/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin 4 | 5 | exec runsvdir -P /etc/service 6 | -------------------------------------------------------------------------------- /docker/tags/lighttpd/var/www/localhost/htdocs/index.php: -------------------------------------------------------------------------------- 1 | &1 4 | source /env 5 | 6 | exec sh /var/lib/litespeed/bin/lswsctrl start 7 | -------------------------------------------------------------------------------- /docker/tags/litespeed/sbin/runit-wrapper: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | main() { 4 | # Dump environment 5 | export > /env 6 | 7 | trap onterm SIGTERM SIGINT 8 | 9 | echo "Starting runit" 10 | /sbin/runsvdir-start & 11 | wait "$!" 12 | } 13 | 14 | onterm() { 15 | echo "Exiting..." 16 | pkill -SIGHUP runsvdir-start 17 | exit $? 18 | } 19 | 20 | main "$@" 21 | -------------------------------------------------------------------------------- /docker/tags/litespeed/sbin/runsvdir-start: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export PATH=/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin 4 | 5 | exec runsvdir -P /etc/service 6 | -------------------------------------------------------------------------------- /docker/tags/nginx/etc/nginx/conf.d/default.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80 default_server; 3 | 4 | root /var/www/html; 5 | 6 | index index.html index.htm index.php; 7 | 8 | server_name _; 9 | 10 | charset utf-8; 11 | 12 | location = /favicon.ico { log_not_found off; access_log off; } 13 | location = /robots.txt { log_not_found off; access_log off; } 14 | 15 | location / { 16 | try_files $uri $uri/ /index.php$is_args$args; 17 | } 18 | 19 | location ~ \.php$ { 20 | fastcgi_pass unix:/run/php/php-fpm.sock; 21 | include fastcgi.conf; 22 | } 23 | 24 | error_page 404 /index.php; 25 | 26 | location ~ /\.ht { 27 | deny all; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /docker/tags/nginx/etc/service/nginx/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | exec 2>&1 4 | source /env 5 | 6 | mkdir -p /run/nginx 7 | exec /usr/sbin/nginx -g 'daemon off;' 8 | -------------------------------------------------------------------------------- /docker/tags/nginx/etc/service/php-fpm/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | exec 2>&1 4 | source /env 5 | 6 | exec php-fpm --nodaemonize 7 | -------------------------------------------------------------------------------- /docker/tags/nginx/sbin/runit-wrapper: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | main() { 4 | # Dump environment 5 | export > /env 6 | 7 | trap onterm SIGTERM SIGINT 8 | 9 | echo "Starting runit" 10 | /sbin/runsvdir-start & 11 | wait "$!" 12 | } 13 | 14 | onterm() { 15 | echo "Exiting..." 16 | pkill -SIGHUP runsvdir-start 17 | exit $? 18 | } 19 | 20 | main "$@" 21 | -------------------------------------------------------------------------------- /docker/tags/nginx/sbin/runsvdir-start: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export PATH=/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin 4 | 5 | exec runsvdir -P /etc/service 6 | -------------------------------------------------------------------------------- /docker/tags/nginx/var/www/html/index.php: -------------------------------------------------------------------------------- 1 | /dev/null 11 | ./test || ((i++)) 12 | popd > /dev/null 13 | } 14 | 15 | if [ "$tests" = "all" ]; then 16 | for x in */;do 17 | run $x 18 | done 19 | else 20 | for test in $tests; do 21 | run $test 22 | done 23 | fi 24 | 25 | exit $i 26 | --------------------------------------------------------------------------------