-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
executable file
·54 lines (40 loc) · 1.37 KB
/
Dockerfile
File metadata and controls
executable file
·54 lines (40 loc) · 1.37 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
FROM ubuntu:16.04
MAINTAINER Josh Diamond "diamond.joshh@gmail.com"
# Allow for a DOCUMENTROOT build argument
ARG documentroot=/var/www/app
ENV LANG C.UTF-8
# UPDATE UBUNTU
RUN apt-get update && apt-get upgrade -y
#RUN apt-get update && apt-get install -y locales && rm -rf /var/lib/apt/lists/*
#RUN localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
#ENV LANG en_US.utf8
RUN apt-get install software-properties-common -y
# INSTALL APACHE
RUN apt-get install apache2 -y
# APACHE ENVIRONMENT VARIABLES
ENV APACHE_SERVERADMIN admin@localhost
ENV APACHE_SERVERNAME localhost
ENV APACHE_SERVERALIAS docker.localhost
ENV APACHE_DOCUMENTROOT ${documentroot:-/var/www/app}
ENV APACHE_RUN_USER www-data
ENV APACHE_RUN_GROUP www-data
ENV APACHE_LOG_DIR /var/log/apache2
ENV APACHE_PID_FILE /var/run/apache2.pid
ENV APACHE_RUN_DIR /var/run/apache2
ENV APACHE_LOCK_DIR /var/lock/apache2
# Install our apacheconf
COPY apache.conf /etc/apache2/sites-available/000-default.conf
# INSTALL PHP
RUN apt-add-repository ppa:ondrej/php
RUN apt-get update
RUN apt-get install -y php7.1 php7.1-common php7.1-curl php7.1-xml php7.1-zip php7.1-gd php7.1-mysql php7.1-mbstring
# TELL APACHE TO USE php7.1
RUN a2enmod php7.1
# TELL APACHE TO ALLOW rewrite
RUN a2enmod rewrite
EXPOSE 80
EXPOSE 8080
EXPOSE 443
EXPOSE 8443
# START APACHE
CMD ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]