Skip to content

Instantly share code, notes, and snippets.

@sufimalek
Last active December 31, 2018 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sufimalek/593ca3ac16ac266f8724461238e02198 to your computer and use it in GitHub Desktop.
Save sufimalek/593ca3ac16ac266f8724461238e02198 to your computer and use it in GitHub Desktop.
Docker file for php7.2-apache
FROM ubuntu:18.04
LABEL maintainer="Sufiyan Malek sufiyanmalek78@gmail.com"
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 \
php-imagick \
# Install tools
openssl \
nano \
graphicsmagick \
imagemagick \
ghostscript \
mysql-client \
iputils-ping \
locales \
sqlite3 \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# 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
# Configure PHP
ADD typo3.php.ini /etc/php/7.2/apache2/conf.d/
# Configure vhost
ADD typo3.default.conf /etc/apache2/sites-enabled/000-default.conf
EXPOSE 80 443
WORKDIR /var/www/html
RUN rm index.html
CMD ["apache2ctl", "-D", "FOREGROUND"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment