forked from assume-framework/assume
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
30 lines (26 loc) · 801 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
# SPDX-FileCopyrightText: ASSUME Developers
#
# SPDX-License-Identifier: AGPL-3.0-or-later
FROM python:3.12-slim
RUN useradd -m -s /bin/bash admin
RUN mkdir /src
WORKDIR /src
COPY README.md pyproject.toml .
#RUN python -m pip install --upgrade pip
# that's needed to use create the requirements.txt only
RUN pip install pip-tools
RUN mkdir assume assume_cli
RUN touch assume/__init__.py
RUN pip-compile --resolver=backtracking -o requirements.txt ./pyproject.toml
RUN pip install --no-cache-dir -r requirements.txt
COPY README.md pyproject.toml /src
COPY assume /src/assume
COPY assume_cli /src/assume_cli
COPY examples /src/examples
ENV PATH=/home/admin/.local/bin:$PATH
RUN chown -R admin /src /home/admin
USER admin
RUN pip install -e .
ENV PYTHONUNBUFFERED=1
EXPOSE 9099
ENTRYPOINT ["assume"]