Managing the selinux context of a file created on the host via a Docker container's volume Managing the selinux context of a file created on the host via a Docker container's volume docker docker

Managing the selinux context of a file created on the host via a Docker container's volume


You can set the following context on the directory

chcon -Rt svirt_sandbox_file_t $HOME/code/export

then run your docker command as

docker run --rm -it -v $HOME/code/export:/exported:ro image /foo/bar