-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
44 lines (36 loc) · 1.41 KB
/
Dockerfile
File metadata and controls
44 lines (36 loc) · 1.41 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
FROM debian:jessie
MAINTAINER Emanuele Disco <emanuele.disco@gmail.com>
RUN printf "deb http://archive.debian.org/debian/ jessie main contrib non-free\ndeb http://archive.debian.org/debian-security jessie/updates main contrib non-free" > /etc/apt/sources.list
RUN apt-get update && apt-get --force-yes -y install \
apache2 \
libapache2-mod-jk \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
ENV APACHE_RUN_USER www-data
ENV APACHE_RUN_GROUP www-data
ENV APACHE_LOG_DIR /var/log/apache2
COPY . /usr/local/src/
RUN set -xe && \
cp /usr/local/src/conf/apache2.conf /etc/apache2/apache2.conf && \
cp /usr/local/src/conf/000-default.conf /etc/apache2/sites-available/ && \
cp /usr/local/src/conf/ss-cert.pem /etc/ssl/private/ && \
# # ENABLE MODS
/usr/sbin/a2enmod ssl && \
/usr/sbin/a2enmod rewrite && \
/usr/sbin/a2enmod proxy && \
/usr/sbin/a2enmod proxy_http && \
/usr/sbin/a2enmod remoteip && \
/usr/sbin/a2dissite 000-default && \
# attach the log to stdout
ln -sf /proc/self/fd/1 ${APACHE_LOG_DIR}/access.log && \
ln -sf /proc/self/fd/1 ${APACHE_LOG_DIR}/error.log && \
# # FINAL SETTINGS
cp /usr/local/src/docker-entrypoint.sh /entrypoint.sh && \
mkdir -p /var/log/apache2 && \
ln -s /var/log/apache2 /etc/apache2/logs && \
rm -rf /usr/local/src
#VOLUME /var/log/apache2
EXPOSE 80
EXPOSE 443
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]