-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
34 lines (25 loc) · 960 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
33
34
FROM node:16-alpine as jsbuilder
COPY . .
RUN npm install -g npm; npm ci; npm run build
FROM python:3.11-bookworm as pybuilder
COPY . .
RUN pip wheel -r requirements.txt --wheel-dir=/wheels
RUN pip wheel mysqlclient==2.1.0 --wheel-dir=/wheels
FROM python:3.11-slim-bookworm
RUN apt-get update; apt-get upgrade -y; apt-get install curl fontconfig -y
ENV \
PIP_NO_CACHE_DIR=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1 \
PYTHONPATH="${PYTHONPATH}:." \
UID=10000 \
GID=10001
COPY . .
COPY --from=pybuilder /wheels /wheels
RUN pip install --no-index --find-links=/wheels -r requirements.txt
COPY --from=jsbuilder seplis/web/static/ui seplis/web/static/ui
COPY --from=jsbuilder seplis/web/templates/ui seplis/web/templates/ui
RUN addgroup --gid $GID --system seplis; adduser --uid $UID --system --gid $GID seplis
USER $UID:$GID
ENTRYPOINT ["python", "seplis/runner.py"]
# docker build -t seplis/seplis --rm .
# docker push seplis/seplis:latest