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

php: add PHP_INI_DIR variable to container #34

Merged
merged 3 commits into from
Jul 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,23 @@ apk add --no-cache php7.3-dev gcc g++
pecl install {extension-name}
```

### PHP ini settings

To configure extra [php.ini](https://www.php.net/manual/en/ini.php): settings,
create application specific `php.ini` and copy the file into docker image:


```ini
# php.ini
memory_limit = 512M
```

```Dockerfile
FROM phpearth/php:7.3-nginx

COPY php.ini $PHP_INI_DIR/conf.d/my-app.ini
```

#### Missing extension?

In case you'd need an additional extension in the PHP.earth repository, [open an issue](https://github.com/phpearth/docker-php/issues).
Expand Down
17 changes: 11 additions & 6 deletions docker/7.0-apache.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,15 @@ LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.description="Docker For PHP Developers - Docker image with PHP 7.0, Apache, and Alpine" \
org.label-schema.url="https://github.com/phpearth/docker-php"

ENV \
# When using Composer, disable the warning about running commands as root/super user
COMPOSER_ALLOW_SUPERUSER=1 \
# Persistent runtime dependencies
DEPS="php7.0 \
# PHP_INI_DIR to be symmetrical with official php docker image
ENV PHP_INI_DIR /etc/php/7.0

# When using Composer, disable the warning about running commands as root/super user
ENV COMPOSER_ALLOW_SUPERUSER=1

# Persistent runtime dependencies
ARG DEPS="\
php7.0 \
php7.0-phar \
php7.0-bcmath \
php7.0-calendar \
Expand Down Expand Up @@ -50,7 +54,8 @@ ENV \
curl \
ca-certificates \
runit \
apache2"
apache2 \
"

# PHP.earth Alpine repository for better developer experience
ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub
Expand Down
17 changes: 11 additions & 6 deletions docker/7.0-cgi.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,15 @@ LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.description="Docker For PHP Developers - Docker image with PHP CGI 7.0, and Alpine" \
org.label-schema.url="https://github.com/phpearth/docker-php"

ENV \
# When using Composer, disable the warning about running commands as root/super user
COMPOSER_ALLOW_SUPERUSER=1 \
# Persistent runtime dependencies
DEPS="php7.0 \
# PHP_INI_DIR to be symmetrical with official php docker image
ENV PHP_INI_DIR /etc/php/7.0

# When using Composer, disable the warning about running commands as root/super user
ENV COMPOSER_ALLOW_SUPERUSER=1

# Persistent runtime dependencies
ARG DEPS="\
php7.0 \
php7.0-phar \
php7.0-bcmath \
php7.0-calendar \
Expand Down Expand Up @@ -49,7 +53,8 @@ ENV \
php7.0-cgi \
curl \
ca-certificates \
runit"
runit \
"

# PHP.earth Alpine repository for better developer experience
ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub
Expand Down
17 changes: 11 additions & 6 deletions docker/7.0-cli.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,15 @@ LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.description="Docker For PHP Developers - Docker image with PHP CLI 7.0, additional PHP extensions, and Alpine" \
org.label-schema.url="https://github.com/phpearth/docker-php"

ENV \
# When using Composer, disable the warning about running commands as root/super user
COMPOSER_ALLOW_SUPERUSER=1 \
# Persistent runtime dependencies
DEPS="php7.0 \
# PHP_INI_DIR to be symmetrical with official php docker image
ENV PHP_INI_DIR /etc/php/7.0

# When using Composer, disable the warning about running commands as root/super user
ENV COMPOSER_ALLOW_SUPERUSER=1

# Persistent runtime dependencies
ARG DEPS="\
php7.0 \
php7.0-phar \
php7.0-bcmath \
php7.0-calendar \
Expand Down Expand Up @@ -47,7 +51,8 @@ ENV \
php7.0-json \
php7.0-posix \
curl \
ca-certificates"
ca-certificates \
"

# PHP.earth Alpine repository for better developer experience
ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub
Expand Down
17 changes: 11 additions & 6 deletions docker/7.0-lighttpd.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,15 @@ LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.description="Docker For PHP Developers - Docker image with PHP 7.0, Lighttpd, and Alpine" \
org.label-schema.url="https://github.com/phpearth/docker-php"

ENV \
# When using Composer, disable the warning about running commands as root/super user
COMPOSER_ALLOW_SUPERUSER=1 \
# Persistent runtime dependencies
DEPS="lighttpd \
# PHP_INI_DIR to be symmetrical with official php docker image
ENV PHP_INI_DIR /etc/php/7.0

# When using Composer, disable the warning about running commands as root/super user
ENV COMPOSER_ALLOW_SUPERUSER=1

# Persistent runtime dependencies
ARG DEPS="\
lighttpd \
php7.0 \
php7.0-phar \
php7.0-bcmath \
Expand Down Expand Up @@ -50,7 +54,8 @@ ENV \
php7.0-fpm \
curl \
ca-certificates \
runit"
runit \
"

# PHP.earth Alpine repository for better developer experience
ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub
Expand Down
17 changes: 11 additions & 6 deletions docker/7.0-litespeed.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,15 @@ LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.description="Docker For PHP Developers - Docker image with PHP 7.0, OpenLiteSpeed, and Alpine" \
org.label-schema.url="https://github.com/phpearth/docker-php"

ENV \
# When using Composer, disable the warning about running commands as root/super user
COMPOSER_ALLOW_SUPERUSER=1 \
# Persistent runtime dependencies
DEPS="curl \
# PHP_INI_DIR to be symmetrical with official php docker image
ENV PHP_INI_DIR /etc/php/7.0

# When using Composer, disable the warning about running commands as root/super user
ENV COMPOSER_ALLOW_SUPERUSER=1

# Persistent runtime dependencies
ARG DEPS="\
curl \
ca-certificates \
runit \
php7.0 \
Expand Down Expand Up @@ -50,7 +54,8 @@ ENV \
php7.0-json \
php7.0-posix \
php7.0-litespeed \
litespeed"
litespeed \
"

# PHP.earth Alpine repository for better developer experience
ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub
Expand Down
17 changes: 11 additions & 6 deletions docker/7.0-nginx.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,15 @@ LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.description="Docker For PHP Developers - Docker image with PHP 7.0, Nginx, and Alpine" \
org.label-schema.url="https://github.com/phpearth/docker-php"

ENV \
# When using Composer, disable the warning about running commands as root/super user
COMPOSER_ALLOW_SUPERUSER=1 \
# Persistent runtime dependencies
DEPS="nginx \
# PHP_INI_DIR to be symmetrical with official php docker image
ENV PHP_INI_DIR /etc/php/7.0

# When using Composer, disable the warning about running commands as root/super user
ENV COMPOSER_ALLOW_SUPERUSER=1

# Persistent runtime dependencies
ARG DEPS="\
nginx \
nginx-mod-http-headers-more \
php7.0 \
php7.0-phar \
Expand Down Expand Up @@ -51,7 +55,8 @@ ENV \
php7.0-fpm \
curl \
ca-certificates \
runit"
runit \
"

# PHP.earth Alpine repository for better developer experience
ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub
Expand Down
17 changes: 11 additions & 6 deletions docker/7.0.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,18 @@ LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.description="Docker For PHP Developers - Docker image with PHP CLI 7.0, and Alpine" \
org.label-schema.url="https://github.com/phpearth/docker-php"

ENV \
# When using Composer, disable the warning about running commands as root/super user
COMPOSER_ALLOW_SUPERUSER=1 \
# Persistent runtime dependencies
DEPS="php7.0 \
# PHP_INI_DIR to be symmetrical with official php docker image
ENV PHP_INI_DIR /etc/php/7.0

# When using Composer, disable the warning about running commands as root/super user
ENV COMPOSER_ALLOW_SUPERUSER=1

# Persistent runtime dependencies
ARG DEPS="\
php7.0 \
curl \
ca-certificates"
ca-certificates \
"

# PHP.earth Alpine repository for better developer experience
ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub
Expand Down
17 changes: 11 additions & 6 deletions docker/7.1-apache.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,15 @@ LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.description="Docker For PHP Developers - Docker image with PHP 7.1, Apache, and Alpine" \
org.label-schema.url="https://github.com/phpearth/docker-php"

ENV \
# When using Composer, disable the warning about running commands as root/super user
COMPOSER_ALLOW_SUPERUSER=1 \
# Persistent runtime dependencies
DEPS="php7.1 \
# PHP_INI_DIR to be symmetrical with official php docker image
ENV PHP_INI_DIR /etc/php/7.1

# When using Composer, disable the warning about running commands as root/super user
ENV COMPOSER_ALLOW_SUPERUSER=1

# Persistent runtime dependencies
ARG DEPS="\
php7.1 \
php7.1-phar \
php7.1-bcmath \
php7.1-calendar \
Expand Down Expand Up @@ -50,7 +54,8 @@ ENV \
curl \
ca-certificates \
runit \
apache2"
apache2 \
"

# PHP.earth Alpine repository for better developer experience
ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub
Expand Down
17 changes: 11 additions & 6 deletions docker/7.1-cgi.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,15 @@ LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.description="Docker For PHP Developers - Docker image with PHP CGI 7.1, and Alpine" \
org.label-schema.url="https://github.com/phpearth/docker-php"

ENV \
# When using Composer, disable the warning about running commands as root/super user
COMPOSER_ALLOW_SUPERUSER=1 \
# Persistent runtime dependencies
DEPS="php7.1 \
# PHP_INI_DIR to be symmetrical with official php docker image
ENV PHP_INI_DIR /etc/php/7.1

# When using Composer, disable the warning about running commands as root/super user
ENV COMPOSER_ALLOW_SUPERUSER=1

# Persistent runtime dependencies
ARG DEPS="\
php7.1 \
php7.1-phar \
php7.1-bcmath \
php7.1-calendar \
Expand Down Expand Up @@ -49,7 +53,8 @@ ENV \
php7.1-cgi \
curl \
ca-certificates \
runit"
runit \
"

# PHP.earth Alpine repository for better developer experience
ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub
Expand Down
17 changes: 11 additions & 6 deletions docker/7.1-cli.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,15 @@ LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.description="Docker For PHP Developers - Docker image with PHP CLI 7.1, additional PHP extensions, and Alpine" \
org.label-schema.url="https://github.com/phpearth/docker-php"

ENV \
# When using Composer, disable the warning about running commands as root/super user
COMPOSER_ALLOW_SUPERUSER=1 \
# Persistent runtime dependencies
DEPS="php7.1 \
# PHP_INI_DIR to be symmetrical with official php docker image
ENV PHP_INI_DIR /etc/php/7.1

# When using Composer, disable the warning about running commands as root/super user
ENV COMPOSER_ALLOW_SUPERUSER=1

# Persistent runtime dependencies
ARG DEPS="\
php7.1 \
php7.1-phar \
php7.1-bcmath \
php7.1-calendar \
Expand Down Expand Up @@ -47,7 +51,8 @@ ENV \
php7.1-json \
php7.1-posix \
curl \
ca-certificates"
ca-certificates \
"

# PHP.earth Alpine repository for better developer experience
ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub
Expand Down
17 changes: 11 additions & 6 deletions docker/7.1-lighttpd.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,15 @@ LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.description="Docker For PHP Developers - Docker image with PHP 7.1, Lighttpd, and Alpine" \
org.label-schema.url="https://github.com/phpearth/docker-php"

ENV \
# When using Composer, disable the warning about running commands as root/super user
COMPOSER_ALLOW_SUPERUSER=1 \
# Persistent runtime dependencies
DEPS="lighttpd \
# PHP_INI_DIR to be symmetrical with official php docker image
ENV PHP_INI_DIR /etc/php/7.1

# When using Composer, disable the warning about running commands as root/super user
ENV COMPOSER_ALLOW_SUPERUSER=1

# Persistent runtime dependencies
ARG DEPS="\
lighttpd \
php7.1 \
php7.1-phar \
php7.1-bcmath \
Expand Down Expand Up @@ -50,7 +54,8 @@ ENV \
php7.1-fpm \
curl \
ca-certificates \
runit"
runit \
"

# PHP.earth Alpine repository for better developer experience
ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub
Expand Down
17 changes: 11 additions & 6 deletions docker/7.1-litespeed.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,15 @@ LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.description="Docker For PHP Developers - Docker image with PHP 7.1, OpenLiteSpeed, and Alpine" \
org.label-schema.url="https://github.com/phpearth/docker-php"

ENV \
# When using Composer, disable the warning about running commands as root/super user
COMPOSER_ALLOW_SUPERUSER=1 \
# Persistent runtime dependencies
DEPS="curl \
# PHP_INI_DIR to be symmetrical with official php docker image
ENV PHP_INI_DIR /etc/php/7.1

# When using Composer, disable the warning about running commands as root/super user
ENV COMPOSER_ALLOW_SUPERUSER=1

# Persistent runtime dependencies
ARG DEPS="\
curl \
ca-certificates \
runit \
php7.1 \
Expand Down Expand Up @@ -50,7 +54,8 @@ ENV \
php7.1-json \
php7.1-posix \
php7.1-litespeed \
litespeed"
litespeed \
"

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