Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,29 @@
FROM python:3.11
FROM python:3.11-alpine AS builder

ENV PYTHONUNBUFFERED 1

WORKDIR /app

COPY ./requirements.txt /app/requirements.txt
RUN apk add --no-cache gcc musl-dev python3-dev libffi-dev

RUN pip install -r requirements.txt
COPY ./requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir --prefix=/install -r requirements.txt

COPY . /app

COPY ./entrypoint.sh /app/entrypoint.sh

RUN chmod +x /app/entrypoint.sh


FROM python:3.11-alpine

ENV PYTHONUNBUFFERED 1

WORKDIR /app

RUN apk add --no-cache libffi

COPY --from=builder /install /usr/local
COPY --from=builder /app /app

# Set the entrypoint to the entrypoint.sh script
ENTRYPOINT ["/app/entrypoint.sh"]
ENTRYPOINT ["/app/entrypoint.sh"]