-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (29 loc) · 1 KB
/
Dockerfile
File metadata and controls
37 lines (29 loc) · 1 KB
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
33
34
35
36
37
FROM python:3.12-slim-bookworm AS builder
RUN apt-get update && apt-get install -y binutils
WORKDIR /app
COPY . .
RUN pip3 install --no-cache-dir . pyinstaller
RUN pyinstaller \
--onefile \
--collect-data opengeodeweb_viewer \
--collect-data vease_viewer \
--collect-all vtkmodules src/vease_viewer/app.py \
--distpath dist \
--name vease-viewer \
--clean
FROM debian:12-slim
# Install ONLY the runtime libraries your binary actually needs
# (this list was tested with VTK + PyQt6 + OpenGEODE apps in 2025)
RUN apt-get update && apt-get install -y --no-install-recommends \
libosmesa6-dev \
libx11-dev \
libxrender-dev \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /app/dist/vease-viewer /usr/local/bin/vease-viewer
RUN chmod +x /usr/local/bin/vease-viewer
RUN mkdir www && touch www/healthcheck
EXPOSE 1234
ENV PYTHON_ENV=prod
ENV DISPLAY=:0
ENTRYPOINT ["/usr/local/bin/vease-viewer"]
CMD ["--data_folder_path", "/data", "--content", "./www", "--host", "0.0.0.0"]