Skip to content

Instantly share code, notes, and snippets.

@sriperinkulam
Created April 28, 2020 07:14
Show Gist options
  • Select an option

  • Save sriperinkulam/26d8702d946a8bad22d7623892be816c to your computer and use it in GitHub Desktop.

Select an option

Save sriperinkulam/26d8702d946a8bad22d7623892be816c to your computer and use it in GitHub Desktop.
Docker Image build for a php Image based on the vanilla apache buster image
FROM php:7.4.3-apache-buster
RUN docker-php-source extract \
&& apt-get update \
&& apt-get install libldap2-dev libxml2-dev nano -y \
libapache2-mod-security2 \
libxslt-dev \
libicu-dev \
libpq-dev
# Install Composer
RUN curl -sS https://getcomposer.org/installer | php \
&& mv composer.phar /usr/local/bin/composer
# Install GD
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng-dev \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install gd
# Install OPCache
RUN docker-php-ext-configure opcache --enable-opcache \
&& docker-php-ext-install opcache
# Install zip
RUN apt-get update && \
apt-get install -y \
libzip-dev \
&& docker-php-ext-install zip
# Install Other extenshions
RUN docker-php-ext-install pdo pdo_mysql xml json opcache session mysqli soap tokenizer xsl intl pdo_pgsql gettext
RUN a2enmod rewrite \
&& a2enmod ssl \
&& a2enmod security2 \
&& a2enmod headers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment