smgc commited on
Commit
2b54096
1 Parent(s): 9636d57

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +27 -0
Dockerfile ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # build stage
2
+ FROM python:3.10 AS builder
3
+
4
+ # install PDM
5
+ RUN pip install -U pip setuptools wheel
6
+ RUN pip install pdm
7
+
8
+ # install dependencies and project into the local packages directory
9
+ WORKDIR /project
10
+ RUN git clone https://github.com/yufeikang/raycast_api_proxy.git .
11
+ RUN mkdir __pypackages__ && pdm install --prod --no-lock --no-editable
12
+
13
+ # run stage
14
+ FROM python:3.10-slim
15
+
16
+ WORKDIR /project
17
+
18
+ # retrieve packages from build stage
19
+ ENV PYTHONPATH=/project/pkgs
20
+ COPY --from=builder /project/__pypackages__/3.10/lib /project/pkgs
21
+ COPY --from=builder /project/app /project/app
22
+ COPY entrypoint.sh /
23
+
24
+ EXPOSE 3000
25
+
26
+ # set command/entrypoint, adapt to fit your needs
27
+ ENTRYPOINT sh /entrypoint.sh