From fb3a8d60228097dde6f6c71ea4a5dce1674e1fe1 Mon Sep 17 00:00:00 2001 From: l3wdfut4pwr Date: Sat, 14 Mar 2026 16:36:41 +0200 Subject: docker light test --- .dockerignore | 8 ++++++++ Dockerfile | 31 ++++++++++++++++++------------- 2 files changed, 26 insertions(+), 13 deletions(-) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..0fdbb52 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,8 @@ +.git +.gitlab-ci.yml +__pycache__ +*.pyc +.env +tests +README.md +.ruff_cache diff --git a/Dockerfile b/Dockerfile index 4a2b50f..8d5509c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,25 +1,30 @@ -FROM python:3.14.3-slim +FROM python:3.14-slim -RUN apt-get update && apt-get install -y \ - curl \ - build-essential \ - && rm -rf /var/lib/apt/lists/* +WORKDIR /app -ENV POETRY_VERSION=2.3.2 -RUN curl -sSL https://install.python-poetry.org | python3 - +ENV PYTHONUNBUFFERED=1 -ENV PATH="/root/.local/bin:$PATH" +ENV POETRY_VERSION=2.3.2 \ + POETRY_NO_INTERACTION=1 \ + POETRY_VIRTUALENVS_CREATE=false + +RUN apt-get update \ + && apt-get install -y curl \ + && rm -rf /var/lib/apt/lists/* -WORKDIR /artberry_backend +RUN curl -sSL https://install.python-poetry.org | python3 + +ENV PATH="/root/.local/bin:$PATH" -COPY pyproject.toml poetry.lock* /artberry_backend/ +# install dependencies (docker cache layer) +COPY pyproject.toml poetry.lock* ./ RUN poetry install --no-root --only main -COPY . /artberry_backend +COPY . . -RUN chmod +x /artberry_backend/start.sh +RUN chmod +x start.sh EXPOSE 8000 -CMD ["/artberry_backend/start.sh"] +CMD ["./start.sh"] -- cgit v1.3-3-g829e