Skip to content

Instantly share code, notes, and snippets.

@bozerkins bozerkins/Dockerfile
Created Jun 10, 2019

Embed
What would you like to do?
Docker Ubuntu - PHP - Apache dev environment example
# Based ON - https://raw.githubusercontent.com/t3kit/ubuntu18.04-php7.2-apache/master/Dockerfile
FROM ubuntu:18.04
ENV DEBIAN_FRONTEND=noninteractive
# install apache / php
RUN apt-get update && apt-get install -yq --no-install-recommends \
apt-utils \
curl \
# Install git
git \
# Install apache
apache2 \
# Install php 7.2
libapache2-mod-php7.2 \
php7.2-cli \
php7.2-json \
php7.2-curl \
php7.2-fpm \
php7.2-gd \
php7.2-ldap \
php7.2-mbstring \
php7.2-mysql \
php7.2-soap \
php7.2-sqlite3 \
php7.2-xml \
php7.2-zip \
php7.2-intl \
# Install tools
openssl \
ca-certificates \
mysql-client \
iputils-ping \
locales \
sqlite3 \
ssh \
sudo \
gnupg \
zip \
unzip \
&& apt-get clean
# Install composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# Set locales
RUN locale-gen en_US.UTF-8 en_GB.UTF-8 de_DE.UTF-8 es_ES.UTF-8 fr_FR.UTF-8 it_IT.UTF-8 km_KH sv_SE.UTF-8 fi_FI.UTF-8
RUN a2enmod rewrite expires
# install app
WORKDIR /var/www/html
# run
CMD apache2ctl -D FOREGROUND
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.