aboutsummaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile19
1 files changed, 13 insertions, 6 deletions
diff --git a/Dockerfile b/Dockerfile
index f33b3fc..ce27ccc 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,6 @@
FROM python:3.11.0-slim-buster as python-base
+# RUN echo 'Acquire::http::Proxy "socks5h://192.168.1.214:9995";' > /etc/apt/apt.conf.d/proxy.conf && \
+# echo 'Acquire::https::Proxy "socks5h://192.168.1.214:9995";' >> /etc/apt/apt.conf.d/proxy.conf
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PIP_NO_CACHE_DIR=off \
@@ -7,20 +9,25 @@ ENV PYTHONUNBUFFERED=1 \
POETRY_HOME="/poetry" \
POETRY_VIRTUALENVS_IN_PROJECT=true \
POETRY_NO_INTERACTION=1 \
- PYSETUP_PATH="/devourer" \
- VENV_PATH="/devourer/.venv"
+ PYSETUP_PATH="/magni" \
+ VENV_PATH="/magni/.venv"
ENV PATH="$POETRY_HOME/bin:$VENV_PATH/bin:$PATH"
FROM python-base as builder-base
ENV POETRY_VERSION=1.2.2
-RUN apt update && apt install -y --no-install-recommends curl build-essential
-RUN curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python
+RUN apt-get update && apt-get install -y --no-install-recommends curl build-essential
+SHELL ["/bin/bash", "-o", "pipefail", "-c"]
+RUN curl -sSL https://install.python-poetry.org | python
+# RUN curl -socks5 socks5h://192.168.1.214:9990 -sSL https://install.python-poetry.org | python
WORKDIR $PYSETUP_PATH
COPY ./pyproject.toml ./
-RUN poetry install --no-dev
+COPY ./poetry.lock ./
+# RUN HTTPS_PROXY=http://192.168.1.214:8118 poetry install --without dev
+RUN poetry install --without dev
FROM python-base as production
COPY --from=builder-base $VENV_PATH $VENV_PATH
COPY ./magni.py $PYSETUP_PATH/magni.py
+COPY ./template.jinja2 $PYSETUP_PATH/
WORKDIR $PYSETUP_PATH
-ENTRYPOINT $PYSETUP_PATH/magni.py
+ENTRYPOINT ["/magni/magni.py"]