2024-02-24 23:38:08 -08:00
|
|
|
# syntax=docker/dockerfile:1.4
|
|
|
|
FROM --platform=$BUILDPLATFORM python:3-alpine AS builder
|
|
|
|
|
|
|
|
|
|
|
|
RUN apk update
|
|
|
|
RUN apk add pkgconfig
|
2024-12-15 23:49:43 -08:00
|
|
|
RUN apk add --virtual build-deps gcc python3-dev musl-dev tesseract-ocr tesseract-ocr-data-eng
|
2024-02-24 23:38:08 -08:00
|
|
|
|
2024-02-25 00:06:27 -08:00
|
|
|
WORKDIR /app
|
|
|
|
COPY . /app
|
|
|
|
|
2024-02-24 23:38:08 -08:00
|
|
|
RUN pip3 install -r requirements.txt
|
|
|
|
RUN pip3 install gunicorn
|
|
|
|
|
|
|
|
RUN chmod u+x ./entrypoint.sh
|
|
|
|
RUN chmod u+x ./entrypoint_celery.sh
|
|
|
|
|
2024-02-25 00:06:27 -08:00
|
|
|
RUN adduser -D python
|
|
|
|
RUN chown -R python:python /app
|
2024-02-24 23:38:08 -08:00
|
|
|
|
2024-02-25 00:06:27 -08:00
|
|
|
USER python
|
|
|
|
ENTRYPOINT ["./entrypoint.sh"]
|