Running GUI applications in Docker container#1
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 48e3de9359
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| **2. Enable X11 access (run only once per session):** | ||
| ```bash | ||
| xhost +local:docker |
There was a problem hiding this comment.
Replace broad xhost ACL with user-scoped rule
The command xhost +local:docker does not limit access to Docker containers as described; per xhost semantics, the local family grants local connections broadly, while single-user scoping is done via si:localuser:.... In practice this can expose the host X server to other local processes during that session, which is a security regression for users following these instructions; use a user-specific rule (for example the container runtime user) instead.
Useful? React with 👍 / 👎.
Description
The documentation previously stated that GUI applications cannot run inside Docker containers. However, Docker does provide workarounds for this limitation. This PR adds comprehensive documentation on how to run GUI applications (like
cv2.imshow()) inside containers.Important note: This feature requires running containers manually - it cannot be used through the Erebus Client.
Changes
xhostconfiguration and Docker flags needed for GUI supportTesting
✅ Tested on Linux (Nixos)
⚠️ WSL2 should work (has X11 support) but not tested
⚠️ Windows/Mac users may need XQuartz or VcXsrv (noted in documentation)