Skip to content

Instantly share code, notes, and snippets.

@floriancourgey
Last active March 12, 2017 18:28
Show Gist options
  • Save floriancourgey/3839fd7f2d0d2f166ef0f53e5d19df9d to your computer and use it in GitHub Desktop.
Save floriancourgey/3839fd7f2d0d2f166ef0f53e5d19df9d to your computer and use it in GitHub Desktop.
Dockerfile pour un serveur LAMP utilisé dans la plupart de mes projets web
# PHP 5.5 avec apache
# basé sur debian:jessie 8.6
FROM php:5.5-apache
# apps
RUN apt update && \
apt install -y \
apt-utils \
vim \
git \
wget \
curl \
libxml2-dev \
zlib1g-dev \
libicu-dev
# .vimrc
RUN wget -O ~/.vimrc https://gist.githubusercontent.com/floriancourgey/6e58eb1852d540df446aca041384891e/raw/.vimrc
# .bashrc
RUN wget -O ~/.bashrc https://gist.githubusercontent.com/floriancourgey/d8abb3d00502e5efc8ee7134461c01e7/raw/.bashrc
# extensions apache
RUN docker-php-ext-configure gd --enable-gd-native-ttf --with-jpeg-dir=/usr/lib/x86_64-linux-gnu --with-png-dir=/usr/lib/x86_64-linux-gnu --with-freetype-dir=/usr/lib/x86_64-linux-gnu
RUN docker-php-ext-install pdo pdo_mysql zip mbstring simplexml xml intl
# locale fr_FR
RUN apt install -y locales
RUN echo "Europe/Paris" > /etc/timezone; dpkg-reconfigure -f noninteractive tzdata
RUN export LANGUAGE=fr_FR.UTF-8; export LANG=fr_FR.UTF-8; export LC_ALL=fr_FR.UTF-8; locale-gen fr_FR.UTF-8; DEBIAN_FRONTEND=noninteractive dpkg-reconfigure locales
# apache mods
RUN a2enmod rewrite
# XDEBUG
RUN pecl install xdebug
# LANCER APACHE
WORKDIR /var/www/html
EXPOSE 80
CMD ["apache2-foreground"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment