2025-02-28 13:47:09 -05:00
|
|
|
# Użyj oficjalnego obrazu Python jako bazowego
|
|
|
|
|
FROM --platform=linux/amd64 python:3.9-slim
|
|
|
|
|
|
|
|
|
|
# Ustaw katalog roboczy w kontenerze
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
|
|
# Zainstaluj git
|
|
|
|
|
RUN apt-get update && apt-get install -y git nano wget curl iputils-ping
|
|
|
|
|
|
|
|
|
|
# Skopiuj pliki wymagań (jeśli istnieją) i zainstaluj zależności
|
|
|
|
|
COPY requirements.txt .
|
2025-02-28 14:40:32 -05:00
|
|
|
RUN pip install --upgrade pip
|
2025-02-28 13:47:09 -05:00
|
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
|
|
|
|
|
|
# Skopiuj plik requirements.txt do kontenera
|
|
|
|
|
COPY requirements.txt .
|
|
|
|
|
|
|
|
|
|
# Zainstaluj zależności z pliku requirements.txt
|
|
|
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
|
|
|
|
|
|
# Zainstaluj Tesseract OCR
|
|
|
|
|
RUN apt-get install -y tesseract-ocr
|
|
|
|
|
|
|
|
|
|
# Skopiuj kod źródłowy do kontenera
|
|
|
|
|
COPY . .
|
|
|
|
|
COPY entrypoint.sh /entrypoint.sh
|
|
|
|
|
|
|
|
|
|
RUN chmod +x /entrypoint.sh
|
|
|
|
|
|
|
|
|
|
# Uruchom aplikację
|
|
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|