Skip to content

Instantly share code, notes, and snippets.

@tinker1987
Last active September 25, 2018 21:16
Show Gist options
  • Save tinker1987/11aaf763d0039be5e1e6d36fc1d6062e to your computer and use it in GitHub Desktop.
Save tinker1987/11aaf763d0039be5e1e6d36fc1d6062e to your computer and use it in GitHub Desktop.
PHP7.2-cli with pre-installed packages
################################################################################
# Base image
################################################################################
FROM php:7.2
################################################################################
# Build instructions
################################################################################
RUN apt-get update && apt-get -my install \
software-properties-common \
apt-transport-https \
lsb-release \
ca-certificates \
git \
curl \
wget \
libmcrypt-dev \
libreadline-dev \
libicu-dev \
libcurl4-openssl-dev \
libbz2-dev \
libgeoip-dev \
libssl-dev \
libfreetype6-dev
RUN docker-php-ext-install -j$(nproc) \
intl \
iconv \
curl \
bcmath \
bz2 \
mysqli \
pdo \
pdo_mysql \
zip
RUN yes | pecl install mcrypt-1.0.1 && docker-php-ext-enable mcrypt
RUN curl -sS https://getcomposer.org/installer | php && mv ./composer.phar /usr/local/bin/composer
RUN mkdir -p /app && chmod -R 777 /app
WORKDIR /app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment