Skip to content

Instantly share code, notes, and snippets.

@adiputra22
Created August 8, 2018 22:50
Show Gist options
  • Save adiputra22/8750578a8db05c38f6d62b2d5189072e to your computer and use it in GitHub Desktop.
Save adiputra22/8750578a8db05c38f6d62b2d5189072e to your computer and use it in GitHub Desktop.
Dockerfile for Symfony, PHP 7.1-apache, GD Image
FROM php:7.1-apache
MAINTAINER Adiputra
COPY . /var/www/html/symfonyproject
COPY .docker/vhost.conf /etc/apache2/sites-available/000-default.conf
WORKDIR /var/www/html/symfonyproject
RUN apt-get update && \
apt-get install -y --no-install-recommends \
curl \
libmemcached-dev \
libz-dev \
libpq-dev \
libjpeg-dev \
libfreetype6-dev \
libssl-dev \
libmcrypt-dev
RUN docker-php-ext-configure gd \
--enable-gd-native-ttf \
--with-jpeg-dir=/usr/lib \
--with-freetype-dir=/usr/include/freetype2 && \
docker-php-ext-install gd
RUN docker-php-ext-install mbstring pdo pdo_mysql mysqli \
&& chown -R www-data:www-data /var/www/html/symfonyproject \
&& a2enmod rewrite
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment