File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -4,15 +4,20 @@ FROM python:3.11 AS builder
4
4
WORKDIR /build
5
5
COPY . .
6
6
7
- RUN pip install .
7
+ RUN apt-get update && apt-get install -y --no-install-recommends \
8
+ build-essential gcc python3-dev pkg-config && \
9
+ rm -rf /var/lib/apt/lists/* && \
10
+ pip install --upgrade pip setuptools wheel build
8
11
9
- RUN python3 setup.py sdist && \
10
- pip install dist/*.tar.gz --target /install
12
+ RUN python -m build && \
13
+ pip install dist/*.tar.gz --prefix= /install
11
14
12
- # minimal runtime image
15
+ # runtime stage
13
16
FROM python:3.11-slim AS runtime
14
17
15
- COPY --from=builder /install /usr/local/lib/python3.11/site-packages
18
+ # copy installed Python libs + CLI scripts
19
+ COPY --from=builder /install /usr/local
20
+
16
21
COPY etc/*.json etc/*.yaml /etc/villas/controller/
17
22
COPY villas-controller.service /etc/systemd/system/
18
23
You can’t perform that action at this time.
0 commit comments