On Fedora and RHEL we ship selinux-enabled flag in the docker.service config,
but if people setup the /var/lib/docker as btrfs and disable SELinux,
we should not block the daemon from running.
Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
| ... | ... |
@@ -775,7 +775,7 @@ func NewDaemonFromDirectory(config *Config, eng *engine.Engine) (*Daemon, error) |
| 775 | 775 |
log.Debugf("Using graph driver %s", driver)
|
| 776 | 776 |
|
| 777 | 777 |
// As Docker on btrfs and SELinux are incompatible at present, error on both being enabled |
| 778 |
- if config.EnableSelinuxSupport && driver.String() == "btrfs" {
|
|
| 778 |
+ if selinuxEnabled() && config.EnableSelinuxSupport && driver.String() == "btrfs" {
|
|
| 779 | 779 |
return nil, fmt.Errorf("SELinux is not supported with the BTRFS graph driver!")
|
| 780 | 780 |
} |
| 781 | 781 |
|