From cf4cefbccd43f24b004b18da3d5c2f84e04a9227 Mon Sep 17 00:00:00 2001 From: andryyy Date: Sun, 14 May 2017 14:23:26 +0200 Subject: [PATCH] Base on Alpine, still needs cleanup --- data/Dockerfiles/php-fpm/Dockerfile | 19 +++++-------------- data/Dockerfiles/php-fpm/docker-entrypoint.sh | 2 +- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/data/Dockerfiles/php-fpm/Dockerfile b/data/Dockerfiles/php-fpm/Dockerfile index 0d65040f..cef46c4e 100644 --- a/data/Dockerfiles/php-fpm/Dockerfile +++ b/data/Dockerfiles/php-fpm/Dockerfile @@ -1,24 +1,15 @@ -FROM php:7.1-fpm +FROM php:7.1-fpm-alpine LABEL maintainer "Andre Peters " ARG DEBIAN_FRONTEND=noninteractive -RUN apt-get update && apt-get install -y \ - g++ \ - libicu-dev \ - libidn11-dev \ - libxml2-dev \ - mysql-client \ - redis-tools \ - zlib1g-dev \ - && rm -rf /var/lib/apt/lists/* - +RUN apk add -U --no-cache libxml2-dev icu-dev redis mysql-client bash autoconf g++ make +RUN pecl install redis && pecl clear-cache RUN docker-php-ext-configure intl RUN docker-php-ext-install intl pdo pdo_mysql xmlrpc +RUN docker-php-ext-enable redis RUN pear install channel://pear.php.net/Net_IDNA2-0.1.1 Auth_SASL Net_IMAP NET_SMTP Net_IDNA2 Mail_mime -RUN pecl install -o -f redis \ - && rm -rf /tmp/pear \ - && docker-php-ext-enable redis +RUN apk del autoconf g++ make libxml2-dev COPY ./docker-entrypoint.sh / diff --git a/data/Dockerfiles/php-fpm/docker-entrypoint.sh b/data/Dockerfiles/php-fpm/docker-entrypoint.sh index 1e4d3fe6..2c73abfc 100755 --- a/data/Dockerfiles/php-fpm/docker-entrypoint.sh +++ b/data/Dockerfiles/php-fpm/docker-entrypoint.sh @@ -50,7 +50,7 @@ fi for file in $(ls /data/dkim/keys/); do domain=${file%.dkim} if [[ -f /data/dkim/txt/${file} ]]; then - redis-cli -h redis-mailcow HSET DKIM_PUB_KEYS "${domain}" "$(cat /data/dkim/keys/${domain})" + redis-cli -h redis-mailcow HSET DKIM_PUB_KEYS "${domain}" "$(cat /data/dkim/txt/${file})" redis-cli -h redis-mailcow HSET DKIM_PRIV_KEYS "${domain}" "$(cat /data/dkim/keys/${file})" redis-cli -h redis-mailcow HSET DKIM_SELECTORS "${domain}" "dkim.${domain}" fi