Trying to mount NFS share with selinux context for docker containers results in 'mount.nfs: an incorrect mount option was specified'

Solution Verified - Updated -

Issue

  • Need to use NFS volumes with docker
  • Trying to mount an NFS share with an SELinux context results in:
    mount.nfs: an incorrect mount option was specified

Environment

  • Red Hat Enterprise Linux 7
  • Red Hat Enterprise Linux Atomic Host
  • Trying to mount an NFS share with -ocontext==system_u:object_r:svirt_sandbox_file_t:s0 for docker formatted containers

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content