File size: 780 Bytes
2b54096
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b51d461
 
b21e6fa
b51d461
 
2b54096
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# build stage
FROM python:3.10 AS builder

# install PDM
RUN pip install -U pip setuptools wheel
RUN pip install pdm

# install dependencies and project into the local packages directory
WORKDIR /project
RUN git clone https://github.com/yufeikang/raycast_api_proxy.git .
RUN mkdir __pypackages__ && pdm install --prod --no-lock --no-editable

# run stage
FROM python:3.10-slim

WORKDIR /project

# retrieve packages from build stage
ENV PYTHONPATH=/project/pkgs

RUN pip install wget
RUN chmod 777 -R /project
RUN mkdir -p ./sync && chmod 777 -R ./sync

COPY --from=builder /project/__pypackages__/3.10/lib /project/pkgs
COPY --from=builder /project/app /project/app
COPY entrypoint.sh /

EXPOSE 3000

# set command/entrypoint, adapt to fit your needs
ENTRYPOINT sh /entrypoint.sh