File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- FROM python:3.11
1+ FROM python:3.11-alpine AS builder
22
33ENV PYTHONUNBUFFERED 1
44
55WORKDIR /app
66
7- COPY ./requirements.txt /app/requirements.txt
7+ RUN apk add --no-cache gcc musl-dev python3-dev libffi-dev
88
9- RUN pip install -r requirements.txt
9+ COPY ./requirements.txt /app/requirements.txt
10+ RUN pip install --no-cache-dir --prefix=/install -r requirements.txt
1011
1112COPY . /app
1213
13- COPY ./entrypoint.sh /app/entrypoint.sh
14-
1514RUN chmod +x /app/entrypoint.sh
1615
16+
17+ FROM python:3.11-alpine
18+
19+ ENV PYTHONUNBUFFERED 1
20+
21+ WORKDIR /app
22+
23+ RUN apk add --no-cache libffi
24+
25+ COPY --from=builder /install /usr/local
26+ COPY --from=builder /app /app
27+
1728# Set the entrypoint to the entrypoint.sh script
18- ENTRYPOINT ["/app/entrypoint.sh" ]
29+ ENTRYPOINT ["/app/entrypoint.sh" ]
You can’t perform that action at this time.
0 commit comments