Skip to content

Commit 90a4ff8

Browse files
committed
fix Dockerfile runtime
1 parent 11d8ae2 commit 90a4ff8

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Dockerfile
2+
README.md
3+
tests\**

.github/workflows/_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ on:
1616
env:
1717
# https://github.com/pytest-dev/pytest/issues/2042
1818
PY_IGNORE_IMPORTMISMATCH: "1"
19-
ENV QT_QPA_PLATFORM: offscreen
19+
QT_QPA_PLATFORM: offscreen
2020

2121
jobs:
2222
run:

Dockerfile

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
# The devcontainer should use the developer target and run as root with podman
22
# or docker with user namespaces.
33
ARG PYTHON_VERSION=3.11
4-
FROM python:${PYTHON_VERSION} as system
4+
FROM python:${PYTHON_VERSION} as developer
55

6-
# Add any system dependencies for developer and runtime targets
6+
# Add any system dependencies for the developer/build environment here
77
RUN apt-get update && apt-get install -y --no-install-recommends \
88
graphviz \
9+
libglib2.0-0 \
910
libqt5gui5 libxcb-xinerama0 \
1011
&& rm -rf /var/lib/apt/lists/*
1112

12-
FROM system as developer
13-
1413
# Set up a virtual environment and put it in PATH
1514
RUN python -m venv /venv
1615
ENV PATH=/venv/bin:$PATH
@@ -25,11 +24,16 @@ RUN pip install .
2524

2625
# The runtime stage copies the built venv into a slim runtime container
2726
FROM python:${PYTHON_VERSION}-slim as runtime
27+
2828
# Add apt-get system dependecies for runtime here if needed
29+
RUN apt-get update && apt-get install -y --no-install-recommends \
30+
libqt5gui5 libxcb-xinerama0 \
31+
&& rm -rf /var/lib/apt/lists/*
32+
2933
COPY --from=build /venv/ /venv/
3034
ENV PATH=/venv/bin:$PATH
3135

3236
# change this entrypoint if it is not the same as the repo
3337
ENTRYPOINT ["dls-pmac-control"]
34-
CMD ["--version"]
38+
3539

0 commit comments

Comments
 (0)