RSSAmplifier

Konstantin Tutsch · Nov 17, 2025

Grant Docker Access To Volume on SELinux Enforced System

0
Sign in to vote or save

This site does not allow itself to be embedded. You can still read it on the original site — the toolbar below keeps your place in the directory.

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…

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! 🥳

Read on konstantintutsch.com

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.