Nov 17, 2025

Home

Grant Docker Access To Volume on SELinux Enforced System

When running Docker on a system enforcing SELinux, Docker Volumes require a special SELinux context to be accessible by the Docker Daemon and Container.

This context is called container_file_t and can be set on a path recursively:

semanage fcontext -a -t container_file_t "<path>(/.*)?"

Afterwards, the context needs to be applied to already existing files:

restorecon -Rv <path>

Your <path> is now usable by Docker as a volume! 🥳