WireViz/Dockerfile
2020-07-08 08:14:15 +02:00

54 lines
1.5 KiB
Docker

############################################################
# Dockerfile to build Flask App
# Based on
############################################################
# Set the base image
FROM debian:latest
# File Author / Maintainer
MAINTAINER Jürgen Key
RUN apt-get update && apt-get install -y apache2 \
libapache2-mod-wsgi-py3 \
build-essential \
python3 \
python3-dev\
python3-pip \
joe \
graphviz \
&& apt-get clean \
&& apt-get autoremove \
&& rm -rf /var/lib/apt/lists/*
# Copy over and install the requirements
COPY ./requirements.txt /var/www/apache-flask/app/requirements.txt
RUN pip3 install -r /var/www/apache-flask/app/requirements.txt
# Copy over the apache configuration file and enable the site
COPY ./src/apache-flask.conf /etc/apache2/sites-available/apache-flask.conf
RUN a2ensite apache-flask
RUN a2enmod headers
# Copy over the wsgi file
COPY ./src/apache-flask.wsgi /var/www/apache-flask/apache-flask.wsgi
COPY ./src/run.py /var/www/apache-flask/run.py
COPY ./src/app /var/www/apache-flask/app/
COPY ./src/wireviz /var/www/apache-flask/wireviz/
COPY ./src/static /var/www/apache-flask/static/
RUN a2dissite 000-default.conf
RUN a2ensite apache-flask.conf
EXPOSE 80
WORKDIR /var/www/apache-flask
# CMD ["/bin/bash"]
CMD /usr/sbin/apache2ctl -D FOREGROUND
# The commands below get apache running but there are issues accessing it online
# The port is only available if you go to another port first
# ENTRYPOINT ["/sbin/init"]
# CMD ["/usr/sbin/apache2ctl"]