File tree 2 files changed +30
-0
lines changed
2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change
1
+ .gitignore
Original file line number Diff line number Diff line change
1
+ FROM python:3.11-slim
2
+
3
+ ENV VIRTUAL_ENV=/venv
4
+
5
+ RUN useradd calmerge --create-home && mkdir /app $VIRTUAL_ENV && chown -R calmerge /app $VIRTUAL_ENV
6
+
7
+ WORKDIR /app
8
+
9
+ # Install poetry at the system level
10
+ RUN pip install --no-cache poetry==1.8.2
11
+
12
+ USER calmerge
13
+
14
+ RUN python -m venv $VIRTUAL_ENV
15
+
16
+ ENV PATH=$VIRTUAL_ENV/bin:$PATH
17
+
18
+ COPY --chown=calmerge pyproject.toml poetry.lock ./
19
+
20
+ RUN pip install --no-cache --upgrade pip && poetry install --no-dev --no-root && rm -rf $HOME/.cache
21
+
22
+ COPY --chown=calmerge . .
23
+
24
+ # Run poetry install again to install our project
25
+ RUN poetry install --no-dev
26
+
27
+ RUN python -m compileall -q $VIRTUAL_ENV .
28
+
29
+ CMD ["/venv/bin/calmerge" , "serve" ]
You can’t perform that action at this time.
0 commit comments