-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (25 loc) · 807 Bytes
/
Dockerfile
File metadata and controls
30 lines (25 loc) · 807 Bytes
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
ARG PLATFORM=linux/amd64
FROM --platform=${PLATFORM} ghcr.io/astral-sh/uv:python3.11-bookworm-slim
ENV DEBIAN_FRONTEND=noninteractive
# Install headless‐display, OpenGL bits, git, and fontconfig for VisPy
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
xvfb \
libgl1-mesa-glx \
libgl1-mesa-dri \
libosmesa6-dev \
libxrender1 \
libxext6 \
fontconfig \
git \
&& rm -rf /var/lib/apt/lists/*
# non‑root user
RUN useradd --create-home appuser
USER appuser
WORKDIR /home/appuser
# mount point for your code
RUN mkdir -p /home/appuser/app
VOLUME ["/home/appuser/app"]
# on start, fire up Xvfb then exec your CMD (or bash)
ENTRYPOINT ["sh","-c","Xvfb :99 -screen 0 1024x768x24 & export DISPLAY=:99 && exec \"${@:-bash}\"","--"]
CMD []