mirror of
https://github.com/immich-app/immich.git
synced 2024-11-28 09:33:27 +02:00
40964187bb
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
33 lines
1.0 KiB
Docker
33 lines
1.0 KiB
Docker
FROM python:3.11-bookworm@sha256:c56b0c6a29abac0de9063124eab09e5c0f4fba422456660f4f1c86703572c050 as builder
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
PYTHONUNBUFFERED=1 \
|
|
PIP_NO_CACHE_DIR=true
|
|
|
|
RUN pip install --upgrade pip && pip install poetry
|
|
RUN poetry config installer.max-workers 10 && \
|
|
poetry config virtualenvs.create false
|
|
RUN python -m venv /opt/venv
|
|
ENV VIRTUAL_ENV="/opt/venv" PATH="/opt/venv/bin:${PATH}"
|
|
|
|
COPY poetry.lock pyproject.toml ./
|
|
RUN poetry install --sync --no-interaction --no-ansi --no-root --only main
|
|
|
|
FROM python:3.11-slim-bookworm@sha256:23f52205321f806c2cc742cefbf837e0d25101388c043e860c7817985230565c
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends tini libmimalloc2.0 && rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /usr/src/app
|
|
ENV NODE_ENV=production \
|
|
TRANSFORMERS_CACHE=/cache \
|
|
PYTHONDONTWRITEBYTECODE=1 \
|
|
PYTHONUNBUFFERED=1 \
|
|
PATH="/opt/venv/bin:$PATH" \
|
|
PYTHONPATH=/usr/src
|
|
|
|
COPY --from=builder /opt/venv /opt/venv
|
|
COPY start.sh log_conf.json ./
|
|
COPY app .
|
|
ENTRYPOINT ["tini", "--"]
|
|
CMD ["./start.sh"]
|