How to fix Error response from daemon: SELinux is not supported with the overlay2 graph driver on this kernel in Docker
Docker fails to start containers when SELinux labeling is enabled but the kernel lacks overlay2/overlayfs support. Use fuse-overlayfs or a compatible driver, or upgrade to a kernel that supports SELinux with overlay2.
Quick fix
Fixes Error response from daemon: SELinux is not supported with the overlay2 graph driver on this kernel
getenforce
uname -r
sudo docker info --format 'Driver: {{.Driver}}' || true
sudo journalctl -u docker --no-pager | tail -20- Confirm SELinux state, kernel, and current storage driver
- Switch to fuse-overlayfs when SELinux is enabled (recommended)
- Update the kernel/OS so overlay2 supports SELinux
- Ensure Docker root is on a filesystem that supports overlayfs + SELinux
getenforceuname -rsudo docker info --format 'Driver: {{.Driver}}' || truesudo journalctl -u docker --no-pager | tail -20Error response from daemon: SELinux is not supported with the overlay2 graph driver on this kernel
What this error means
Docker throws this error when it tries to initialize the overlay2 storage driver while SELinux enforcement is on, but the running kernel doesn't support overlayfs with SELinux labeling. To avoid unlabeled writes and permission denials, dockerd refuses to run overlay2 and exits early. This is common on older RHEL/CentOS kernels or when forcing overlay2 in rootless mode on SELinux systems. The fix is to use a storage driver that works with SELinux on your kernel (fuse-overlayfs or overlay), or upgrade to a kernel and policy set that supports overlay2 with SELinux.
Typical symptoms
- Docker service fails to start and journalctl shows 'SELinux is not supported with the overlay2 graph driver on this kernel'.
- docker info errors out or never reports a storage driver when SELinux is enforcing.
- Container commands (run/build/compose) fail immediately with the daemon error before any image is pulled.
- Rootless setup tools warn that overlay2 is blocked when SELinux is enabled.
Common causes
- Kernel lacks SELinux-enabled overlayfs support (common on older RHEL/CentOS kernels or custom builds).
- Rootless Docker forcing overlay2 while SELinux is enforcing; rootless needs fuse-overlayfs for SELinux systems.
- Docker data root sits on XFS without ftype=1 or missing overlayfs features, so SELinux + overlay2 is rejected.
- daemon.json explicitly forces overlay2 on a distro that defaults to fuse-overlayfs/overlay for SELinux compatibility.
- Outdated or missing container-selinux policy after an OS upgrade prevents overlay mounts from being labeled.
How to fix "Error response from daemon: SELinux is not supported with the overlay2 graph driver on this kernel"
Check whether SELinux is enforcing and what driver Docker is trying to use. If dockerd isn't running, look at recent logs.
getenforce
uname -r
sudo docker info --format 'Driver: {{.Driver}}' || true
sudo journalctl -u docker --no-pager | tail -20If SELinux is Enforcing and the logs show the overlay2/SELinux error, continue below.
fuse-overlayfs supports SELinux labeling on kernels that lack native overlayfs + SELinux. Install the package and configure Docker to use it.
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<'EOF'
{
"storage-driver": "fuse-overlayfs",
"selinux-enabled": true
}
EOF
sudo systemctl restart docker
# For rootless: systemctl --user restart dockerAfter restart, 'docker info' should show 'fuse-overlayfs' as the storage driver.
If you want native overlay2, upgrade to a kernel that includes overlayfs SELinux support (e.g., modern Fedora/RHEL kernels) and ensure container-selinux is current.
# Example on RHEL/Fedora
sudo dnf upgrade kernel container-selinux
sudo systemctl restart dockerOlder kernels (e.g., early 3.x/4.x) often cannot run overlay2 with SELinux; upgrading is the cleanest fix.
Overlayfs with SELinux requires features like d_type and XFS ftype=1. If Docker data is on XFS without ftype=1 or a filesystem lacking overlay features, move it.
# Check XFS ftype
sudo xfs_info /var/lib/docker | grep ftype || true
# Move Docker root to a compatible filesystem (example)
sudo systemctl stop docker
sudo mv /var/lib/docker /var/lib/docker.bak
sudo mkdir -p /mnt/docker-root
# mount or create a compatible filesystem at /mnt/docker-root
sudo ln -s /mnt/docker-root /var/lib/docker
sudo systemctl start dockerIf ftype is 0 or unsupported, recreate the filesystem with ftype=1 or use ext4.
If you cannot change the kernel immediately, using the legacy "overlay" driver (without SELinux labeling) or temporarily setting SELinux to Permissive can keep you running—only for short-term testing, not production:
# Fallback to overlay driver (no SELinux labels)
sudo tee /etc/docker/daemon.json <<'EOF'
{ "storage-driver": "overlay", "selinux-enabled": false }
EOF
sudo systemctl restart docker
# TEMPORARY: set SELinux to permissive just to confirm the root cause
sudo setenforce 0 # switch back with: sudo setenforce 1After any change, verify with:
docker info --format 'Driver: {{.Driver}}'
docker run --rm hello-worldOnly keep permissive mode long enough to validate; re-enable SELinux or move to fuse-overlayfs/updated kernel.
Advanced notes
On SELinux systems, rootless Docker defaults to fuse-overlayfs because native overlay2 labeling is not always available. If you override the driver, keep selinux-enabled=true when supported so container files stay labeled correctly.
Frequently asked questions
- What does "Error response from daemon: SELinux is not supported with the overlay2" mean?
- Docker throws this error when it tries to initialize the overlay2 storage driver while SELinux enforcement is on, but the running kernel doesn't support overlayfs with SELinux labeling. To avoid unlabeled writes and permission denials, dockerd refuses to run overlay2 and exits early. This is common on older RHEL/CentOS kernels or when forcing overlay2 in rootless mode on SELinux systems.
- How do I fix "Error response from daemon: SELinux is not supported with the overlay2"?
- Docker fails to start containers when SELinux labeling is enabled but the kernel lacks overlay2/overlayfs support. Use fuse-overlayfs or a compatible driver, or upgrade to a kernel that supports SELinux with overlay2.
- What causes "Error response from daemon: SELinux is not supported with the overlay2"?
- Kernel lacks SELinux-enabled overlayfs support (common on older RHEL/CentOS kernels or custom builds). Rootless Docker forcing overlay2 while SELinux is enforcing; rootless needs fuse-overlayfs for SELinux systems. Docker data root sits on XFS without ftype=1 or missing overlayfs features, so SELinux + overlay2 is rejected.
- Is the "Error response from daemon: SELinux is not supported with the overlay2" error serious?
- Yes. This is a high-severity error that usually blocks work until it is fixed, but the steps above resolve it.