Skip to content
This repository was archived by the owner on Mar 24, 2022. It is now read-only.

Commit 4969bca

Browse files
authored
Merge pull request #34 from glensc/patch-1
php: add PHP_INI_DIR variable to container
2 parents 1eedbdb + 9c3858e commit 4969bca

36 files changed

+402
-210
lines changed

README.md

+17
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,23 @@ apk add --no-cache php7.3-dev gcc g++
148148
pecl install {extension-name}
149149
```
150150

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+
151168
#### Missing extension?
152169

153170
In case you'd need an additional extension in the PHP.earth repository, [open an issue](https://github.com/phpearth/docker-php/issues).

docker/7.0-apache.Dockerfile

+11-6
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,15 @@ LABEL org.label-schema.build-date=$BUILD_DATE \
1212
org.label-schema.description="Docker For PHP Developers - Docker image with PHP 7.0, Apache, and Alpine" \
1313
org.label-schema.url="https://github.com/phpearth/docker-php"
1414

15-
ENV \
16-
# When using Composer, disable the warning about running commands as root/super user
17-
COMPOSER_ALLOW_SUPERUSER=1 \
18-
# Persistent runtime dependencies
19-
DEPS="php7.0 \
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 \
2024
php7.0-phar \
2125
php7.0-bcmath \
2226
php7.0-calendar \
@@ -50,7 +54,8 @@ ENV \
5054
curl \
5155
ca-certificates \
5256
runit \
53-
apache2"
57+
apache2 \
58+
"
5459

5560
# PHP.earth Alpine repository for better developer experience
5661
ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub

docker/7.0-cgi.Dockerfile

+11-6
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,15 @@ LABEL org.label-schema.build-date=$BUILD_DATE \
1212
org.label-schema.description="Docker For PHP Developers - Docker image with PHP CGI 7.0, and Alpine" \
1313
org.label-schema.url="https://github.com/phpearth/docker-php"
1414

15-
ENV \
16-
# When using Composer, disable the warning about running commands as root/super user
17-
COMPOSER_ALLOW_SUPERUSER=1 \
18-
# Persistent runtime dependencies
19-
DEPS="php7.0 \
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 \
2024
php7.0-phar \
2125
php7.0-bcmath \
2226
php7.0-calendar \
@@ -49,7 +53,8 @@ ENV \
4953
php7.0-cgi \
5054
curl \
5155
ca-certificates \
52-
runit"
56+
runit \
57+
"
5358

5459
# PHP.earth Alpine repository for better developer experience
5560
ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub

docker/7.0-cli.Dockerfile

+11-6
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,15 @@ LABEL org.label-schema.build-date=$BUILD_DATE \
1212
org.label-schema.description="Docker For PHP Developers - Docker image with PHP CLI 7.0, additional PHP extensions, and Alpine" \
1313
org.label-schema.url="https://github.com/phpearth/docker-php"
1414

15-
ENV \
16-
# When using Composer, disable the warning about running commands as root/super user
17-
COMPOSER_ALLOW_SUPERUSER=1 \
18-
# Persistent runtime dependencies
19-
DEPS="php7.0 \
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 \
2024
php7.0-phar \
2125
php7.0-bcmath \
2226
php7.0-calendar \
@@ -47,7 +51,8 @@ ENV \
4751
php7.0-json \
4852
php7.0-posix \
4953
curl \
50-
ca-certificates"
54+
ca-certificates \
55+
"
5156

5257
# PHP.earth Alpine repository for better developer experience
5358
ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub

docker/7.0-lighttpd.Dockerfile

+11-6
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,15 @@ LABEL org.label-schema.build-date=$BUILD_DATE \
1212
org.label-schema.description="Docker For PHP Developers - Docker image with PHP 7.0, Lighttpd, and Alpine" \
1313
org.label-schema.url="https://github.com/phpearth/docker-php"
1414

15-
ENV \
16-
# When using Composer, disable the warning about running commands as root/super user
17-
COMPOSER_ALLOW_SUPERUSER=1 \
18-
# Persistent runtime dependencies
19-
DEPS="lighttpd \
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 \
2024
php7.0 \
2125
php7.0-phar \
2226
php7.0-bcmath \
@@ -50,7 +54,8 @@ ENV \
5054
php7.0-fpm \
5155
curl \
5256
ca-certificates \
53-
runit"
57+
runit \
58+
"
5459

5560
# PHP.earth Alpine repository for better developer experience
5661
ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub

docker/7.0-litespeed.Dockerfile

+11-6
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,15 @@ LABEL org.label-schema.build-date=$BUILD_DATE \
1212
org.label-schema.description="Docker For PHP Developers - Docker image with PHP 7.0, OpenLiteSpeed, and Alpine" \
1313
org.label-schema.url="https://github.com/phpearth/docker-php"
1414

15-
ENV \
16-
# When using Composer, disable the warning about running commands as root/super user
17-
COMPOSER_ALLOW_SUPERUSER=1 \
18-
# Persistent runtime dependencies
19-
DEPS="curl \
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 \
2024
ca-certificates \
2125
runit \
2226
php7.0 \
@@ -50,7 +54,8 @@ ENV \
5054
php7.0-json \
5155
php7.0-posix \
5256
php7.0-litespeed \
53-
litespeed"
57+
litespeed \
58+
"
5459

5560
# PHP.earth Alpine repository for better developer experience
5661
ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub

docker/7.0-nginx.Dockerfile

+11-6
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,15 @@ LABEL org.label-schema.build-date=$BUILD_DATE \
1212
org.label-schema.description="Docker For PHP Developers - Docker image with PHP 7.0, Nginx, and Alpine" \
1313
org.label-schema.url="https://github.com/phpearth/docker-php"
1414

15-
ENV \
16-
# When using Composer, disable the warning about running commands as root/super user
17-
COMPOSER_ALLOW_SUPERUSER=1 \
18-
# Persistent runtime dependencies
19-
DEPS="nginx \
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 \
2024
nginx-mod-http-headers-more \
2125
php7.0 \
2226
php7.0-phar \
@@ -51,7 +55,8 @@ ENV \
5155
php7.0-fpm \
5256
curl \
5357
ca-certificates \
54-
runit"
58+
runit \
59+
"
5560

5661
# PHP.earth Alpine repository for better developer experience
5762
ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub

docker/7.0.Dockerfile

+11-6
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,18 @@ LABEL org.label-schema.build-date=$BUILD_DATE \
1212
org.label-schema.description="Docker For PHP Developers - Docker image with PHP CLI 7.0, and Alpine" \
1313
org.label-schema.url="https://github.com/phpearth/docker-php"
1414

15-
ENV \
16-
# When using Composer, disable the warning about running commands as root/super user
17-
COMPOSER_ALLOW_SUPERUSER=1 \
18-
# Persistent runtime dependencies
19-
DEPS="php7.0 \
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 \
2024
curl \
21-
ca-certificates"
25+
ca-certificates \
26+
"
2227

2328
# PHP.earth Alpine repository for better developer experience
2429
ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub

docker/7.1-apache.Dockerfile

+11-6
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,15 @@ LABEL org.label-schema.build-date=$BUILD_DATE \
1212
org.label-schema.description="Docker For PHP Developers - Docker image with PHP 7.1, Apache, and Alpine" \
1313
org.label-schema.url="https://github.com/phpearth/docker-php"
1414

15-
ENV \
16-
# When using Composer, disable the warning about running commands as root/super user
17-
COMPOSER_ALLOW_SUPERUSER=1 \
18-
# Persistent runtime dependencies
19-
DEPS="php7.1 \
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 \
2024
php7.1-phar \
2125
php7.1-bcmath \
2226
php7.1-calendar \
@@ -50,7 +54,8 @@ ENV \
5054
curl \
5155
ca-certificates \
5256
runit \
53-
apache2"
57+
apache2 \
58+
"
5459

5560
# PHP.earth Alpine repository for better developer experience
5661
ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub

docker/7.1-cgi.Dockerfile

+11-6
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,15 @@ LABEL org.label-schema.build-date=$BUILD_DATE \
1212
org.label-schema.description="Docker For PHP Developers - Docker image with PHP CGI 7.1, and Alpine" \
1313
org.label-schema.url="https://github.com/phpearth/docker-php"
1414

15-
ENV \
16-
# When using Composer, disable the warning about running commands as root/super user
17-
COMPOSER_ALLOW_SUPERUSER=1 \
18-
# Persistent runtime dependencies
19-
DEPS="php7.1 \
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 \
2024
php7.1-phar \
2125
php7.1-bcmath \
2226
php7.1-calendar \
@@ -49,7 +53,8 @@ ENV \
4953
php7.1-cgi \
5054
curl \
5155
ca-certificates \
52-
runit"
56+
runit \
57+
"
5358

5459
# PHP.earth Alpine repository for better developer experience
5560
ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub

docker/7.1-cli.Dockerfile

+11-6
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,15 @@ LABEL org.label-schema.build-date=$BUILD_DATE \
1212
org.label-schema.description="Docker For PHP Developers - Docker image with PHP CLI 7.1, additional PHP extensions, and Alpine" \
1313
org.label-schema.url="https://github.com/phpearth/docker-php"
1414

15-
ENV \
16-
# When using Composer, disable the warning about running commands as root/super user
17-
COMPOSER_ALLOW_SUPERUSER=1 \
18-
# Persistent runtime dependencies
19-
DEPS="php7.1 \
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 \
2024
php7.1-phar \
2125
php7.1-bcmath \
2226
php7.1-calendar \
@@ -47,7 +51,8 @@ ENV \
4751
php7.1-json \
4852
php7.1-posix \
4953
curl \
50-
ca-certificates"
54+
ca-certificates \
55+
"
5156

5257
# PHP.earth Alpine repository for better developer experience
5358
ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub

docker/7.1-lighttpd.Dockerfile

+11-6
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,15 @@ LABEL org.label-schema.build-date=$BUILD_DATE \
1212
org.label-schema.description="Docker For PHP Developers - Docker image with PHP 7.1, Lighttpd, and Alpine" \
1313
org.label-schema.url="https://github.com/phpearth/docker-php"
1414

15-
ENV \
16-
# When using Composer, disable the warning about running commands as root/super user
17-
COMPOSER_ALLOW_SUPERUSER=1 \
18-
# Persistent runtime dependencies
19-
DEPS="lighttpd \
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 \
2024
php7.1 \
2125
php7.1-phar \
2226
php7.1-bcmath \
@@ -50,7 +54,8 @@ ENV \
5054
php7.1-fpm \
5155
curl \
5256
ca-certificates \
53-
runit"
57+
runit \
58+
"
5459

5560
# PHP.earth Alpine repository for better developer experience
5661
ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub

docker/7.1-litespeed.Dockerfile

+11-6
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,15 @@ LABEL org.label-schema.build-date=$BUILD_DATE \
1212
org.label-schema.description="Docker For PHP Developers - Docker image with PHP 7.1, OpenLiteSpeed, and Alpine" \
1313
org.label-schema.url="https://github.com/phpearth/docker-php"
1414

15-
ENV \
16-
# When using Composer, disable the warning about running commands as root/super user
17-
COMPOSER_ALLOW_SUPERUSER=1 \
18-
# Persistent runtime dependencies
19-
DEPS="curl \
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 \
2024
ca-certificates \
2125
runit \
2226
php7.1 \
@@ -50,7 +54,8 @@ ENV \
5054
php7.1-json \
5155
php7.1-posix \
5256
php7.1-litespeed \
53-
litespeed"
57+
litespeed \
58+
"
5459

5560
# PHP.earth Alpine repository for better developer experience
5661
ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub

0 commit comments

Comments
 (0)