cleanup in docker

This commit is contained in:
Mateusz Gruszczyński
2026-03-19 09:54:03 +01:00
parent 616fcacb60
commit 4ddb48aef0
4 changed files with 7 additions and 52 deletions

View File

@@ -12,12 +12,12 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt requirements.txt
COPY docker/requirements.txt /app/requirements.txt
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
COPY . /app
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

View File

@@ -1,46 +0,0 @@
FROM python:3.14-alpine
WORKDIR /app
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
RUN apk add --no-cache \
tesseract-ocr \
tesseract-ocr-data-pol \
poppler-utils \
libstdc++ \
libffi \
openssl \
postgresql-libs \
zlib \
jpeg \
libpng \
openblas \
&& apk add --no-cache --virtual .build-deps \
build-base \
python3-dev \
musl-dev \
linux-headers \
libffi-dev \
openssl-dev \
postgresql-dev \
zlib-dev \
jpeg-dev \
libpng-dev \
openblas-dev \
cmake \
cargo \
rust
COPY requirements-stable.txt /app/requirements-stable.txt
RUN pip install --no-cache-dir --upgrade pip setuptools wheel \
&& pip install --no-cache-dir -r /app/requirements-stable.txt
COPY . .
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]

View File

@@ -12,12 +12,13 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt requirements.txt
COPY docker/requirements.txt /app/requirements.txt
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
COPY . /app
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

View File

@@ -12,12 +12,12 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
COPY requirements-stable.txt requirements.txt
COPY docker/requirements-stable.txt /app/requirements.txt
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
COPY . /app
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh