-
Notifications
You must be signed in to change notification settings - Fork 6
/
Dockerfile
45 lines (31 loc) · 995 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
37
38
39
40
41
42
43
44
45
FROM python:3.12
ARG POETRY_OPTS
ENV POETRY_OPTS=${POETRY_OPTS} \
POETRY_VERSION=$POETRY_VERSION \
POETRY_HOME="/opt/poetry" \
POETRY_VIRTUALENVS_IN_PROJECT=true \
POETRY_NO_INTERACTION=1
ENV \
PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PYTHONFAULTHANDLER=1
ENV \
PIP_NO_CACHE_DIR=off \
PIP_PROGRESS_BAR=off \
PIP_DISABLE_PIP_VERSION_CHECK=on \
PIP_DEFAULT_TIMEOUT=100
RUN pip install poetry
ENV PATH="$POETRY_HOME/bin:$PATH"
RUN poetry config virtualenvs.create false
COPY . /opt/ixmp4
WORKDIR /opt/ixmp4
RUN mkdir -p run/logs && \
touch .env
RUN poetry self add "poetry-dynamic-versioning[plugin]" && \
poetry dynamic-versioning
RUN poetry build --format wheel && \
poetry export ${POETRY_OPTS} --format requirements.txt --output constraints.txt --without-hashes
RUN pip install ./dist/*.whl && \
pip install -r constraints.txt
EXPOSE 9000
CMD [ "ixmp4", "server", "start", "--host=0.0.0.0", "--port=9000" ]