-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (21 loc) · 927 Bytes
/
Copy pathDockerfile
File metadata and controls
30 lines (21 loc) · 927 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
FROM python:3.14-slim AS poetry
RUN apt-get update && apt-get install -y \
curl gcc python3-dev libc-dev build-essential \
&& rm -rf /var/lib/apt/lists/*
RUN curl https://install.python-poetry.org | python -
COPY pyproject.toml /opt/StorageLeaf/pyproject.toml
COPY poetry.lock /opt/StorageLeaf/poetry.lock
COPY src/ /opt/StorageLeaf/src
WORKDIR /opt/StorageLeaf
RUN /root/.local/bin/poetry install --no-root
RUN ln -s $($HOME/.local/share/pypoetry/venv/bin/poetry env info -p) /opt/StorageLeaf/venv
FROM python:3.14-slim
RUN apt-get update && apt-get upgrade -y && \
rm -rf /var/lib/apt/lists/*
COPY src/ /opt/StorageLeaf/src
COPY --from=poetry /opt/StorageLeaf/venv /opt/StorageLeaf/venv
RUN adduser StorageLeaf && chown -R StorageLeaf:StorageLeaf /opt/StorageLeaf
USER StorageLeaf
WORKDIR /opt/StorageLeaf/src
EXPOSE 10003
CMD [ "/opt/StorageLeaf/venv/bin/python", "/opt/StorageLeaf/src/StorageLeaf.py"]