forked from Serverlag/router-config-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
32 lines (23 loc) · 862 Bytes
/
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
FROM python:3.9.7
# change shell to bash
SHELL ["/bin/bash", "-c"]
# copy requirements.txt
COPY requirements.txt .
# copy application files
COPY router-config-generator/ /router-config-generator
# Install dependancies for, and s6-overlay
RUN python3 -m venv /router-config-generator/router-config-generator && \
source /router-config-generator/router-config-generator/bin/activate && \
apt update && apt install curl -y && \
mkdir -p /etc/services.d/rcg && \
# Install s6-overlay
curl --location -s https://raw.githubusercontent.com/mikenye/deploy-s6-overlay/master/deploy-s6-overlay.sh | sh
# install python dependancies
RUN python3 -m pip install --upgrade pip && \
pip3 install -r requirements.txt
# copy run file for s6-overlay
COPY ./run /etc/services.d/rcg
# expose port for web app
EXPOSE 5000
# go!
ENTRYPOINT [ "/init" ]