-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
46 lines (34 loc) · 1.08 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
# _ _ _ _ _ _
# __| | __ _ ___ | (_) __ _| |__ | |_ _ _(_)
# / _` |/ _` |/ _ \_____| | |/ _` | '_ \| __|____| | | | |
# | (_| | (_| | __/_____| | | (_| | | | | ||_____| |_| | |
# \__,_|\__,_|\___| |_|_|\__, |_| |_|\__| \__,_|_|
# |___/
#
# https://github.com/daeuniverse/dae-light-ui
#
# Copyright (C) 2023 @daeuniverse
#
# This is a self-hosted software, liscensed under the MIT License.
# See /License for more information.
# === Build Stage === #
FROM python:3.10-bullseye as builder
WORKDIR /app
ADD requirements.txt ./
RUN pip install -r requirements.txt
COPY src/ ./
RUN pyinstaller app.py
# === Prod Stage === #
FROM ubuntu:latest as prod
RUN apt update -y && \
apt-get install -y --no-install-recommends \
ca-certificates libcap-dev
RUN apt-get clean autoclean && \
apt-get autoremove -y && \
rm -rf /var/lib/{apt,dpkg,cache,log}/
WORKDIR /app
COPY src/templates/ ./templates/
COPY src/static/ ./static/
COPY --from=builder /app/dist/app/ ./
RUN chmod +x ./app
CMD ["./app"]