允许所有用户访问X11服务,运行命令:
xhost +
version: '2'
services:
cajviewer:
image: boringcat/cajviewer
hostname: CAJViewer # 容器主机名,为了好看
devices:
- /dev/fuse
cap_add:
- SYS_ADMIN
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix
- $HOME:/HostHome # 可选,但是你不选怎么打开文件呢?
environment:
DISPLAY: unix$DISPLAY
或
docker run -d --name cajviewer --hostname CAJViewer\
--device /dev/fuse --cap-add SYS_ADMIN\
-v /tmp/.X11-unix:/tmp/.X11-unix\
-v $HOME:/HostHome\
-e DISPLAY=unix$DISPLAY\
boringcat/cajviewer
Content type
Image
Digest
Size
143.7 MB
Last updated
over 6 years ago
docker pull boringcat/cajviewer