forked from powerseb/NoPhish
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PROXY-Dockerfile
41 lines (31 loc) · 1.16 KB
/
PROXY-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
# The Base Image used to create this Image
FROM ubuntu:latest
# Just my name who wrote this file
MAINTAINER HubbelBubbel
# Install apache2
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y apache2 php libapache2-mod-php dsniff cron
# Enable the required apache modules
RUN a2enmod proxy proxy_balancer proxy_connect proxy_http proxy_http2 proxy_wstunnel rewrite slotmem_shm ssl headers auth_basic
RUN a2dismod autoindex -f
RUN mv /var/www/html/index.html /var/www/html/index.html.old
COPY ./proxy/index.html /var/www/html/
# Copy the virtual host configuration file
COPY ./proxy/security.conf /etc/apache2/conf-enabled/
# Start Apache
# RUN service apache2 start
CMD ["/bin/bash","service","apache2","start"]
# Create redirects
RUN touch /tmp/redirects.txt
# RUN chown www-data:www-data /tmp/redirects.txt
RUN chmod 777 /tmp/redirects.txt
# disconnect script
COPY ./proxy/discon.sh /usr/local/bin/
WORKDIR /usr/local/bin/
RUN chmod +x discon.sh
RUN echo "* * * * * root /usr/local/bin/discon.sh" > /etc/cron.d/my_cronjob
RUN chmod 0644 /etc/cron.d/my_cronjob
CMD ["cron", "-f"]
# To tell docker to expose this port
EXPOSE 80
EXPOSE 443
EXPOSE 65534