-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (27 loc) · 1.43 KB
/
Dockerfile
File metadata and controls
36 lines (27 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM ubuntu:16.04
LABEL maintainer="Giovanni DeCristofaro"
# Manually set up the apache environment variables
ENV APACHE_RUN_USER www-data
ENV APACHE_RUN_GROUP www-data
ENV APACHE_LOG_DIR /var/log/apache2
ENV APACHE_LOCK_DIR /var/lock/apache2
ENV APACHE_PID_FILE /var/run/apache2.pid
# Install apache and depnendencies
RUN apt-get update && apt-get install -y apache2 curl \
&& apt-get install -y libxml2 libxml2-dev libcurl4-openssl-dev libjpeg-dev libpng12-dev fontconfig wget \
&& apt-get install -y libfreetype6-dev libmcrypt-dev autoconf libmagickwand-dev imagemagick pkg-config
# Install php
RUN apt-get install -y php7.0 php7.0-common php7.0-cli php7.0-mcrypt php7.0-gd php7.0-json php7.0-mysql php7.0-imap \
&& apt-get install -y php7.0-mbstring php7.0-mcrypt php7.0-dev php7.0-xml \
&& apt-get install -y php7.0-curl php7.0-zip php7.0-readline php7.0-opcache php-imagick
# Install libapache php and composer
RUN apt-get install -y libapache2-mod-php7.0 \
&& php -r "readfile('http://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer
# Enable apache modules
RUN a2enmod php7.0 && a2enmod rewrite
# Copy the apache config
COPY apache-site.conf /etc/apache2/sites-enabled/000-default.conf
# Clenaup
RUN apt-get remove -y --purge software-properties-common && apt-get -y autoremove && apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
CMD ["/usr/sbin/apache2", "-DFOREGROUND"]