raycast / Dockerfile
smgc's picture
Create Dockerfile
e3f2070 verified
raw
history blame
825 Bytes
# build stage
FROM python:3.10 AS builder
# install PDM
RUN pip install -U pip setuptools wheel
RUN pip install pdm
RUN git clone https://github.com/yufeikang/raycast_api_proxy.git .
# copy files
COPY pyproject.toml pdm.lock README.md /project/
# install dependencies and project into the local packages directory
WORKDIR /project
RUN mkdir __pypackages__ && pdm install --prod --no-lock --no-editable
# run stage
FROM python:3.10-slim
# retrieve packages from build stage
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
# set command/entrypoint, adapt to fit your needs
ENTRYPOINT sh /entrypoint.sh