-
Notifications
You must be signed in to change notification settings - Fork 53
/
Dockerfile
32 lines (27 loc) · 858 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 ubuntu:22.04
ARG RUNTIME_USER="koa"
ARG RUNTIME_USER_UID=4583
ARG APP_HOME="/koa"
ARG DEBIAN_FRONTEND=noninteractive
RUN apt update && \
apt install -y python3 librrd-dev libpython3-dev python3-pip && \
pip3 install --no-cache-dir flask flask_cors requests rrdtool prometheus_client waitress && \
rm -rf /var/lib/apt/lists/* && \
mkdir /data && \
mkdir -p $APP_HOME/static && \
useradd $RUNTIME_USER -u $RUNTIME_USER_UID && \
usermod $RUNTIME_USER -d $APP_HOME
COPY css $APP_HOME/css
COPY js $APP_HOME/js
COPY static/images $APP_HOME/static/images
COPY entrypoint.sh \
backend.py \
index.html \
LICENSE \
NOTICE \
$APP_HOME/
RUN chown -R $RUNTIME_USER:$RUNTIME_USER $APP_HOME && \
chown -R $RUNTIME_USER:$RUNTIME_USER /data
WORKDIR $APP_HOME
VOLUME ["/data"]
ENTRYPOINT ["sh", "./entrypoint.sh"]