-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
46 lines (35 loc) · 1.17 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
44
45
46
FROM ubuntu:latest
# Setup Environment
ENV PYTHONUNBUFFERED 1
# Tmp Env Vars for Django to run
ENV DEBUG False
# Install Dependencies
RUN apt-get update && apt-get install -y wakeonlan \
inetutils-ping \
python3 \
python3-pip \
apache2 \
libapache2-mod-wsgi-py3
# Remove Temporary Files
RUN apt-get clean autoclean && \
apt-get autoremove --yes && \
rm -rf /var/lib/{apt,dpkg,cache,log}/
# Create link from pip to pip3 and python to python3
RUN ln -s /usr/bin/pip3 /usr/bin/pip
RUN ln -s /usr/bin/python3 /usr/bin/python
# Setup working directory
RUN mkdir /var/www/html/django-wol
WORKDIR /var/www/html/django-wol
# Install dependencies via pip
RUN pip install --upgrade pip
ADD requirements.txt /var/www/html/django-wol
RUN pip install -r requirements.txt
# Add django-wol-web
ADD django-wol /var/www/html/django-wol
# Add apache config
RUN echo hi
ADD apache.conf /etc/apache2/sites-available/000-default.conf
# Add start.sh
ADD start.sh /
EXPOSE 80
ENTRYPOINT [ "/start.sh"]