Subscription: Business
For: Administrators
Enhanced Container Isolation (ECI) provides an additional layer of security to prevent malicious workloads running in containers from compromising Docker Desktop or the host.
It uses a variety of advanced techniques to harden container isolation, but without impacting developer productivity.
Enhanced Container Isolation ensures stronger container isolation and also locks in any security configurations that have been created by administrators, for instance through Registry Access Management policies or with Settings Management.
ECI is in addition to other container security techniques used by Docker. For example, reduced Linux Capabilities, seccomp, and AppArmor.
When Enhanced Container Isolation is turned on, the following features and security techniques are enabled:
/proc
and /sys
are emulated inside the container.--privileged
flag) work, but they are only privileged within the container's Linux user namespace, not in the Docker Desktop VM. Therefore they can't be used to breach the Docker Desktop VM.In addition, the following restrictions are imposed:
--network=host
, --pid=host
are disallowed).These features and restrictions ensure that containers are better secured at runtime, with minimal impact to developer experience and productivity. Developers can continue to use Docker Desktop as usual, but the containers they launch are more strongly isolated.
For more information on how Enhanced Container Isolation work, see How does it work.
As a developerECI protection for Docker builds and Kubernetes in Docker Desktop varies according to the Docker Desktop version. Later versions include more protection than earlier versions. Also, ECI does not yet protect extension containers. For more information on known limitations and workarounds, see FAQs.
To enable Enhanced Container Isolation as a developer:
As an administrator PrerequisiteEnhanced Container Isolation does not protect containers created prior to enabling ECI. For more information on known limitations and workarounds, see FAQs.
You first need to enforce sign-in to ensure that all Docker Desktop developers authenticate with your organization. Since Settings Management requires a Docker Business subscription, enforced sign-in guarantees that only authenticated users have access and that the feature consistently takes effect across all users, even though it may still work without enforced sign-in.
SetupCreate and configure the admin-settings.json
file and specify:
Setting "value": true
ensures ECI is enabled by default. By setting "locked": true
, ECI can't be disabled by developers. If you want to give developers the ability to disable the feature, set "locked": false
.
In addition, you can also configure Docker socket mount permissions for containers.
For this to take effect:
Selecting Restart from the Docker menu isn't enough as it only restarts some components of Docker Desktop.
You can now also configure these settings in the Docker Admin Console.
When Enhanced Container Isolation is enabled, users see:
To check, run:
The following output displays:
This indicates that the container's root user (0) maps to unprivileged user (100000) in the Docker Desktop VM, and that the mapping extends for a range of 64K user-IDs. If a container process were to escape the container, it would find itself without privileges at the VM level. The user-ID mapping varies with each new container, as each container gets an exclusive range of host User-IDs for isolation. User-ID mapping is automatically managed by Docker Desktop. For further details, see How Enhanced Container Isolation works.
In contrast, without ECI the Linux user namespace is not used for containers, the following displays:
This means that the root user in the container (0) is in fact the root user in the Docker Desktop VM (0) which reduces container isolation.
Since Enhanced Container Isolation uses the Sysbox container runtime embedded in the Docker Desktop Linux VM, another way to determine if a container is running with Enhanced Container Isolation is by using docker inspect
:
It outputs:
Without Enhanced Container Isolation, docker inspect
outputs runc
, which is the standard OCI runtime.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4