Skip to content

SELinux

mviereck edited this page Oct 17, 2018 · 1 revision

How to bypass SELinux restrictions

Default SELinux settings do not allow access to host files shared with --volume. There is a flag z or Zthat can be added to --volume, but it still does not allow access to UNIX sockets like /tmp/.X11-unix/X0. This affects especially Fedora and CentOS where SELinux is enabled by default.

Allow access for docker containers to shared files and unix sockets with docker run option:

--security-opt label=type:container_runtime_t

Compare: SELinux and docker: allow access to X unix socket in /tmp/.X11-unix

Clone this wiki locally