add php
fix dnsdist url
This commit is contained in:
parent
0dcc701b6c
commit
d6e39dae83
|
@ -1,3 +1,3 @@
|
|||
# DNSDist on Docker
|
||||
|
||||
This repository contains a Docker image of PowerDNS [dnsdist](http://dnsdist.org/).
|
||||
This repository contains a Docker image of PowerDNS [dnsdist](https://dnsdist.org/).
|
||||
|
|
65
php/Dockerfile
Normal file
65
php/Dockerfile
Normal file
|
@ -0,0 +1,65 @@
|
|||
#
|
||||
# Dockerfile
|
||||
#
|
||||
|
||||
FROM php:8-fpm-alpine AS builder
|
||||
MAINTAINER Yann Verry <docker@verry.org>
|
||||
|
||||
|
||||
# build FROM
|
||||
RUN apk update && apk add --no-cache postgresql-dev \
|
||||
git \
|
||||
autoconf \
|
||||
dpkg-dev dpkg \
|
||||
file \
|
||||
g++ \
|
||||
gcc \
|
||||
libc-dev \
|
||||
make \
|
||||
pkgconf \
|
||||
libzip-dev \
|
||||
libpng-dev \
|
||||
libwebp-dev \
|
||||
imagemagick-dev \
|
||||
imagemagick \
|
||||
freetype-dev \
|
||||
libjpeg-turbo-dev \
|
||||
icu-dev \
|
||||
gettext-dev \
|
||||
re2c \
|
||||
zlib-dev \
|
||||
gmp-dev && \
|
||||
pecl install apcu redis && \
|
||||
docker-php-ext-configure gd --with-webp --with-jpeg --with-freetype && \
|
||||
docker-php-ext-install pdo_pgsql pdo_mysql mysqli zip gd intl exif gettext gmp bcmath && \
|
||||
docker-php-ext-enable opcache redis && \
|
||||
docker-php-ext-enable apcu --ini-name 10-docker-php-ext-apcu.ini
|
||||
|
||||
# build php-imagick from github source (php8 compat)
|
||||
RUN cd /usr/src && \
|
||||
git clone https://github.com/Imagick/imagick.git && \
|
||||
cd imagick && \
|
||||
phpize && \
|
||||
./configure && \
|
||||
make && \
|
||||
make install && \
|
||||
rm -rf /usr/src/* && \
|
||||
docker-php-ext-enable imagick
|
||||
|
||||
# run FROM
|
||||
FROM php:8-fpm-alpine
|
||||
|
||||
RUN apk update && apk add --no-cache imagemagick \
|
||||
postgresql-libs \
|
||||
libzip \
|
||||
libpng \
|
||||
libwebp \
|
||||
libjpeg-turbo \
|
||||
icu-libs
|
||||
|
||||
# copy so
|
||||
COPY --from=builder /usr/local/lib/php/extensions/no-debug-non-zts-20200930/*.so /usr/local/lib/php/extensions/no-debug-non-zts-20200930/
|
||||
COPY --from=builder /usr/local/etc/php/conf.d/* /usr/local/etc/php/conf.d/
|
||||
|
||||
COPY config/ini/*.ini $PHP_INI_DIR/conf.d/
|
||||
COPY config/php-fpm/*.conf /usr/local/etc/php-fpm.d/
|
8
php/Makefile
Normal file
8
php/Makefile
Normal file
|
@ -0,0 +1,8 @@
|
|||
all: pull build
|
||||
|
||||
|
||||
pull:
|
||||
docker pull php:8-fpm-alpine
|
||||
|
||||
build:
|
||||
docker build --network yann_default -t php-alpine .
|
34
php/README.md
Normal file
34
php/README.md
Normal file
|
@ -0,0 +1,34 @@
|
|||
# PHP on Docker
|
||||
|
||||
This repository contains a Docker image of [PHP](https://php.net/).
|
||||
|
||||
## Extensions added
|
||||
|
||||
* postgresql
|
||||
* imagick
|
||||
|
||||
## Enable extensions
|
||||
|
||||
* gd
|
||||
* pdo_pgsql
|
||||
* pdo_mysql
|
||||
* mysqli
|
||||
* zip
|
||||
* gd
|
||||
* intl
|
||||
* exif
|
||||
* gettext
|
||||
* gmp
|
||||
* bcmath
|
||||
* opcache
|
||||
* redis
|
||||
* apcu
|
||||
|
||||
## config
|
||||
|
||||
enable APCU and Opcache
|
||||
|
||||
### PHP-FPM
|
||||
|
||||
expose_php off
|
||||
memory_limit `512M`
|
2
php/config/ini/apcu.ini
Normal file
2
php/config/ini/apcu.ini
Normal file
|
@ -0,0 +1,2 @@
|
|||
[apcu]
|
||||
apc.enable_cli=1
|
7
php/config/ini/opcache.ini
Normal file
7
php/config/ini/opcache.ini
Normal file
|
@ -0,0 +1,7 @@
|
|||
opcache.enable=1
|
||||
opcache.enable_cli=1
|
||||
opcache.interned_strings_buffer=8
|
||||
opcache.max_accelerated_files=10000
|
||||
opcache.memory_consumption=128
|
||||
opcache.save_comments=1
|
||||
opcache.revalidate_freq=1
|
2
php/config/php-fpm/expose.conf
Normal file
2
php/config/php-fpm/expose.conf
Normal file
|
@ -0,0 +1,2 @@
|
|||
[www]
|
||||
php_admin_value[expose_php] = Off
|
2
php/config/php-fpm/memory.conf
Normal file
2
php/config/php-fpm/memory.conf
Normal file
|
@ -0,0 +1,2 @@
|
|||
[www]
|
||||
php_admin_value[memory_limit] = 512M
|
Loading…
Reference in a new issue