Cannot use Dockerfile properly

Project ID: e63e1e3d-bdae-455f-9c76-d709ea072fc4 I have a Dockerfile like this:
FROM debian:11-slim AS build
RUN apt-get update
RUN apt-get install --no-install-suggests --no-install-recommends --yes python3-venv gcc libpython3-dev
RUN apt-get clean
RUN python3 -m venv /venv

FROM build AS export-req
COPY requirements.txt /
RUN /venv/bin/pip install -r requirements.txt

FROM gcr.io/distroless/python3-debian11
COPY --from=export-req /venv /venv
COPY . /app
WORKDIR /app
ENTRYPOINT ["/venv/bin/python3", "bot.py"]
FROM debian:11-slim AS build
RUN apt-get update
RUN apt-get install --no-install-suggests --no-install-recommends --yes python3-venv gcc libpython3-dev
RUN apt-get clean
RUN python3 -m venv /venv

FROM build AS export-req
COPY requirements.txt /
RUN /venv/bin/pip install -r requirements.txt

FROM gcr.io/distroless/python3-debian11
COPY --from=export-req /venv /venv
COPY . /app
WORKDIR /app
ENTRYPOINT ["/venv/bin/python3", "bot.py"]
The problem is, Railway never read and install the requirements.txt when deploying, leading to my application has no packages to deploy, thus, fail. Any idea why this can occur?
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server