|
|
|
FROM python:3.10 AS builder |
|
|
|
|
|
RUN pip install -U pip setuptools wheel |
|
RUN pip install pdm |
|
|
|
RUN git clone https://github.com/yufeikang/raycast_api_proxy.git . |
|
|
|
|
|
COPY pyproject.toml pdm.lock README.md /project/ |
|
|
|
|
|
WORKDIR /project |
|
RUN mkdir __pypackages__ && pdm install --prod --no-lock --no-editable |
|
|
|
|
|
FROM python:3.10-slim |
|
|
|
|
|
ENV PYTHONPATH=/project/pkgs |
|
COPY --from=builder /project/__pypackages__/3.10/lib /project/pkgs |
|
COPY --from=builder /app /project/app |
|
COPY --from=builder /scripts/entrypoint.sh / |
|
|
|
RUN sed -i'' 's|--port 80|--port 8000|g' /entrypoint.sh |
|
|
|
|
|
EXPOSE 8000 |
|
|
|
WORKDIR /project |
|
|
|
ENTRYPOINT sh /entrypoint.sh |