-
Notifications
You must be signed in to change notification settings - Fork 71
/
Copy pathDockerfile
36 lines (22 loc) · 963 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
35
36
FROM python:3.12.3
ENV DEBIAN_FRONTEND=noninteractive
ENV POETRY_NO_INTERACTION=1 \
POETRY_CACHE_DIR=/tmp/poetry_cache
# POETRY_VIRTUALENVS_IN_PROJECT=1 \
# POETRY_VIRTUALENVS_CREATE=true \
RUN --mount=type=cache,target=~/.cache/pip pip install poetry && poetry config virtualenvs.create false
WORKDIR /app
RUN --mount=type=cache,target=~/.cache/pip pip install wheel Cython
COPY ./rl_string_helper ./rl_string_helper
RUN --mount=type=cache,target=~/.cache/pip pip3 install ./rl_string_helper
COPY ./database-lib ./database-lib
RUN --mount=type=cache,target=~/.cache/pip pip3 install ./database-lib
COPY ./medium-parser ./medium-parser
RUN --mount=type=cache,target=~/.cache/pip pip3 install ./medium-parser
COPY ./web ./web
WORKDIR /app/web
RUN --mount=type=cache,target=/tmp/poetry_cache poetry install --without dev --only main --no-ansi
RUN apt install -y curl
RUN useradd -m freedium
USER freedium
CMD ["python3", "-m", "server", "server"]