content/manuals/enterprise/security/hardened-desktop/enhanced-container-isolation/enable-eci.md
{{< summary-bar feature_name="Hardened Docker Desktop" >}}
ECI prevents malicious containers from compromising Docker Desktop while maintaining full developer productivity.
This page shows you how to turn on Enhanced Container Isolation (ECI) and verify it's working correctly.
Before you begin, you must have:
Turn on ECI in your Docker Desktop settings:
Sign in to your organization in Docker Desktop. Your organization must have a Docker Business subscription.
Stop and remove all existing containers:
$ docker stop $(docker ps -q)
$ docker rm $(docker ps -aq)
In Docker Desktop, go to Settings > General.
Select the Use Enhanced Container Isolation checkbox.
Select Apply and restart.
[!IMPORTANT]
ECI doesn't protect containers created before turning on the feature. Remove existing containers before turning on ECI.
Configure Enhanced Container Isolation organization-wide using Settings Management:
{{< tabs >}} {{< tab name="Admin Console" >}}
{{< /tab >}} {{< tab name="JSON file" >}}
Create an admin-settings.json file and add:
{
"configurationFileVersion": 2,
"enhancedContainerIsolation": {
"value": true,
"locked": true
}
}
Configure the following as needed:
"value": true: Turns on ECI by default (required)"locked": true: Prevents developers from turning off ECI"locked": false: Allows developers to control the setting{{< /tab >}} {{< /tabs >}}
For ECI settings to take effect:
[!IMPORTANT]
Restarting from the Docker Desktop menu isn't sufficient. Users must completely quit and reopen Docker Desktop.
You can also configure Docker socket mount permissions for trusted images that need Docker API access.
After turning on ECI, verify it's working correctly using these methods.
Run a container and examine the user namespace mapping:
$ docker run --rm alpine cat /proc/self/uid_map
With ECI turned on:
0 100000 65536
This shows the container's root user (0) maps to an unprivileged user (100000) in the Docker Desktop VM, with a range of 64K user IDs. Each container gets an exclusive user ID range for isolation.
With ECI turned off:
0 0 4294967295
This shows the container root user (0) maps directly to the VM root user (0), providing less isolation.
Verify the container runtime being used:
$ docker inspect --format='{{.HostConfig.Runtime}}' <container_name>
With ECI turned on, it turns sysbox-runc. With ECI turned off, it returns
runc.
Verify that ECI security restrictions are active.
Test namespace sharing:
$ docker run -it --rm --pid=host alpine
With ECI turned on, this command fails with an error about Sysbox containers not being able to share namespaces with the host.
Test Docker socket access:
$ docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock alpine
With ECI turned on, this command fails unless you've configured Docker socket exceptions for trusted images.
When administrators enforce Enhanced Container Isolation through Settings Management:
"locked": true, the setting is locked and greyed out.sysbox-runc as the container runtime in docker inspect output.