Docker: SELinux relabeling issue for a local nfs volume
Issue
-
With the latest update of
docker(rhel7 extra repo), we encounter a bug withnfs volumes(local driver):# docker volume create -d local --name xxx --opt type=nfs --opt o=addr=xxxx,rw,actimeo=0,sync --opt device=</path/to/dir> # docker run --rm -ti -v xxx:xxx --name <container name> <image name> /bin/bash -
The above command reports below error:
ERROR: for <service name> Cannot create container for service php-local: SELinux relabeling of /var/lib/docker/volumes/image/_data is not allowed: "operation not supported"
Environment
- Red Hat Enterprise Linux (RHEL) 7.3
- docker-1.12.6-28.git1398f24.el7.x86_64
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
