-
Notifications
You must be signed in to change notification settings - Fork 9
/
Dockerfile
43 lines (34 loc) · 1.12 KB
/
Dockerfile
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
# adct - Dockerfile
# https://github.com/ArtiomL/adct
# Artiom Lichtenstein
# v1.0.6, 09/01/2018
FROM debian:stable-slim
LABEL maintainer="Artiom Lichtenstein" version="1.0.6"
# Core dependencies
RUN apt-get update && \
apt-get install -y apache2 php7.0 && \
apt-get autoclean -y && \
apt-get autoremove -y && \
apt-get clean -y && \
rm -rf /var/lib/apt/lists/*
# adct
COPY / /var/www/adct/
RUN cp /var/www/adct/index.php /var/www/adct/secure/index.php
# apache2
RUN cp /var/www/adct/etc/adct*.conf /etc/apache2/sites-available/
RUN cat /var/www/adct/etc/apache2.conf | tee -a /etc/apache2/apache2.conf
RUN htpasswd -cb /etc/apache2/.htpasswd user user
RUN a2dissite 000-default.conf
RUN a2enmod ssl headers
RUN sed -i 's/Listen 80/Listen 8080/g' /etc/apache2/ports.conf
RUN sed -i 's/Listen 443/Listen 8443/g' /etc/apache2/ports.conf
RUN a2ensite adct.conf adct-ssl.conf
# System account
RUN useradd -r -u 1001 user
RUN chown -RL user: /etc/ssl/private/ /var/log/apache2/ /var/run/apache2/
# Expose ports
EXPOSE 8080 8443
# UID to use when running the image and for CMD
USER 1001
# Run
CMD ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]