Skip to content

Instantly share code, notes, and snippets.

@herloct
Created January 30, 2017 02:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save herloct/54d5c0133b06b5420700d5058fed3a56 to your computer and use it in GitHub Desktop.
Save herloct/54d5c0133b06b5420700d5058fed3a56 to your computer and use it in GitHub Desktop.
Contoh Dockerfile
FROM php:7.1.1-fpm-alpine
MAINTAINER herloct <herloct@***.com>
RUN apk update --no-cache \
&& apk add --no-cache \
freetype-dev \
hiredis-dev \
icu-dev \
libjpeg-turbo-dev \
libpng-dev \
postgresql-dev \
zlib-dev \
&& apk add --no-cache --virtual .ext-deps \
autoconf \
gcc \
git \
make \
musl-dev \
openssl-dev \
re2c \
&& pecl install --onlyreqdeps mongodb xdebug \
&& docker-php-ext-enable mongodb \
&& git clone https://github.com/nrk/phpiredis.git \
&& ( \
cd phpiredis \
&& git checkout v1.0.0 \
&& phpize \
&& ./configure --enable-phpiredis \
&& make \
&& make install \
) \
&& rm -r phpiredis \
&& docker-php-ext-enable phpiredis \
&& docker-php-ext-configure gd \
--with-freetype-dir=/usr/include/ \
--with-jpeg-dir=/usr/include/ \
--with-png-dir=/usr/include/ \
&& docker-php-ext-install \
bcmath \
gd \
intl \
opcache \
pdo_pgsql \
zip \
&& apk del --no-cache --purge -r .ext-deps \
&& rm -rf /var/cache/apk/* /tmp/* \
&& printf "date.timezone = UTC\n" >> $PHP_INI_DIR/conf.d/timezone.ini
VOLUME ["/project"]
WORKDIR /project
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment