Skip to content

Commit fef894b

Browse files
committed
fix(dockerfile): add comment explaining root user requirement for USB access
1 parent 6f00924 commit fef894b

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

slimevr/Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
# syntax=docker/dockerfile:1.4
2+
# Running as root is required because:
3+
# - SlimeVR needs privileged mode for USB/HID tracker access
4+
# - Java process needs access to /dev nodes
5+
# - Docker container isolation provides the security boundary
26
FROM eclipse-temurin:21-jre
37

48
ARG SLIMEVR_VERSION=latest
@@ -25,4 +29,4 @@ RUN if [ "${SLIMEVR_VERSION}" = "latest" ] || [ -z "${SLIMEVR_VERSION}" ]; then
2529

2630
VOLUME ["/gui_mount"]
2731

28-
CMD cp -r /gui/* /gui_mount && java -XX:ActiveProcessorCount=$(nproc) -jar slimevr.jar run --no-gui
32+
CMD ["sh", "-c", "cp -r /gui/* /gui_mount && exec java -XX:ActiveProcessorCount=$(nproc) -jar slimevr.jar run --no-gui"]

0 commit comments

Comments
 (0)