-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (22 loc) · 714 Bytes
/
Copy pathDockerfile
File metadata and controls
33 lines (22 loc) · 714 Bytes
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
FROM ubuntu
LABEL version="0.2.1"
RUN apt update
RUN apt upgrade -y
RUN apt install -y python3 python3-pip libpq-dev
EXPOSE 8080
RUN useradd --system --shell /bin/bash --uid 1001 -m --no-log-init ics
RUN mkdir -p /ics/db
RUN mkdir -p /ics/data
RUN mkdir -p /ics/log
RUN chown -R ics /ics
USER ics
WORKDIR /ics
ADD ics ics
ADD requirements.txt .
RUN pip install -r requirements.txt --break-system-packages
RUN pip install psycopg2 --break-system-packages
VOLUME /ics/db
VOLUME /ics/data
VOLUME /ics/log
ENV DB_CONNECTION_STRING=sqlite:////ics/db/ics.sqlite
CMD PYTHONPATH=. python3 ics/scripts/webapp.py --host 0.0.0.0 --data_dir /ics/data --log_dir /ics/log --db_connection_string $DB_CONNECTION_STRING