Skip to content

Commit

Permalink
Base commit
Browse files Browse the repository at this point in the history
  • Loading branch information
fbouliane committed Mar 28, 2019
0 parents commit eba5cfc
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 0 deletions.
19 changes: 19 additions & 0 deletions php7.2/alpine/mcrypt-memcached-mongodb-redis/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM php:7.2.9-alpine@sha256:b7470c2adc0163b91a27d0fd1e107b5fb57bacc28c682acd2514e8289e8fa50b

RUN apk add --no-cache zlib-dev=1.2.11-r1 \
libmcrypt-dev=2.5.8-r7 \
curl-dev=7.61.1-r1 \
libmemcached-dev=1.0.18-r2 \
gnupg=2.2.8-r0 \
fontconfig=2.12.6-r1 \
autoconf=2.69-r2 \
$PHPIZE_DEPS

RUN pecl install memcached-3.0.4 \
redis-4.1.1 \
mongodb-1.5.3 \
mcrypt-1.0.1

RUN docker-php-ext-enable memcached redis mongodb mcrypt

RUN docker-php-ext-install curl bcmath zip
17 changes: 17 additions & 0 deletions php7.2/apache/mcrypt-memcached-mongodb-redis/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM php:7.2.9-apache@sha256:42bbbfb881af0d50f8cee436b7645589798e6f17eeec8e63d59239b24d77254c

RUN apt-get update -q && DEBIAN_FRONTEND=noninteractive apt install -y libmcrypt-dev=2.5.8-3.3 \
libcurl4-gnutls-dev=7.52.1-* \
zlib1g-dev=1:1.2.8.* \
libmemcached-dev=1.0.18-4.1 \
gnupg2=2.1.18-8* \
fontconfig=2.11.0-*

RUN pecl install memcached-3.0.4 \
redis-4.1.1 \
mongodb-1.5.2 \
mcrypt-1.0.1

RUN docker-php-ext-enable memcached redis mongodb mcrypt

RUN docker-php-ext-install curl bcmath zip
26 changes: 26 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# php with PECL precompiled package

This repostory allows to store pre-built php images with PECL embedded.
Reinstalling PECL packages everytime is a slow process and we want to benefit
from docker cache as much as possible.

## Variants
For now the project provides images for -alpine and -apache variant of the official
php library. it's based on 7.2 because it's currently the best practice.

[https://hub.docker.com/_/php/](https://hub.docker.com/_/php/)

php7.2-alpine-mcrypt-memcached-mongodb-redis:1.0

php7.2-apache-mcrypt-memcached-mongodb-redis:1.0



## Image size

This was taken experimetally

| VARIANT | SIZE |
| ------- | -------|
| apache | ~440MB |
| alpine | ~318MB |

0 comments on commit eba5cfc

Please sign in to comment.