content/manuals/enterprise/security/enforce-sign-in/methods.md
{{< summary-bar feature_name="Enforce sign-in" >}}
You can enforce sign-in for Docker Desktop using several methods. Choose the method that best fits your organization's infrastructure and security requirements.
| Method | Platform |
|---|---|
| Registry key | Windows only |
| Configuration profiles | macOS only |
plist file | macOS only |
registry.json | All platforms |
[!TIP]
For macOS, configuration profiles offer the highest security because they're protected by Apple's System Integrity Protection (SIP).
{{< tabs >}} {{< tab name="Manual setup" >}}
To configure the registry key method manually:
Create the registry key:
$ HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Docker\Docker Desktop
Create a multi-string value name allowedOrgs.
Use your organization names as string data:
Restart Docker Desktop.
Verify the Sign in required! prompt appears in Docker Desktop.
[!IMPORTANT]
You can add multiple organizations with Docker Desktop version 4.36 and later. With version 4.35 and earlier, adding multiple organizations causes sign-in enforcement to fail silently.
{{< /tab >}} {{< tab name="Group Policy deployment" >}}
Deploy the registry key across your organization using Group Policy:
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Docker\Docker DesktopallowedOrgsgpupdate/force.{{< /tab >}} {{< /tabs >}}
{{< summary-bar feature_name="Config profiles" >}}
Configuration profiles provide the most secure enforcement method for macOS, as they're protected by Apple's System Integrity Protection.
The payload is a dictionary of key-values. Docker Desktop supports the following keys:
allowedOrgs: Sets a list of organizations in one single string, where each organization is separated by a semi-colon.In Docker Desktop version 4.48 and later, the following keys are also supported:
overrideProxyHTTP: Sets the URL of the HTTP proxy that must be used for outgoing HTTP requests.overrideProxyHTTPS: Sets the URL of the HTTP proxy that must be used for outgoing HTTPS requests.overrideProxyExclude: Bypasses proxy settings for the specified hosts and domains. Uses a comma-separated list.overrideProxyPAC: Sets the file path where the PAC file is located. It has precedence over the remote PAC file on the selected proxy.overrideProxyEmbeddedPAC: Sets the content of an in-memory PAC file. It has precedence over overrideProxyPAC.Overriding at least one of the proxy settings via Configuration profiles will automatically lock the settings as they're managed by macOS.
docker.mobileconfig and include the following content:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<key>PayloadType</key>
<string>com.docker.config</string>
<key>PayloadVersion</key>
<integer>1</integer>
<key>PayloadIdentifier</key>
<string>com.docker.config</string>
<key>PayloadUUID</key>
<string>eed295b0-a650-40b0-9dda-90efb12be3c7</string>
<key>PayloadDisplayName</key>
<string>Docker Desktop Configuration</string>
<key>PayloadDescription</key>
<string>Configuration profile to manage Docker Desktop settings.</string>
<key>PayloadOrganization</key>
<string>Your Company Name</string>
<key>allowedOrgs</key>
<string>first_org;second_org</string>
<key>overrideProxyHTTP</key>
<string>http://company.proxy:port</string>
<key>overrideProxyHTTPS</key>
<string>https://company.proxy:port</string>
</dict>
</array>
<key>PayloadType</key>
<string>Configuration</string>
<key>PayloadVersion</key>
<integer>1</integer>
<key>PayloadIdentifier</key>
<string>com.yourcompany.docker.config</string>
<key>PayloadUUID</key>
<string>0deedb64-7dc9-46e5-b6bf-69d64a9561ce</string>
<key>PayloadDisplayName</key>
<string>Docker Desktop Config Profile</string>
<key>PayloadDescription</key>
<string>Config profile to enforce Docker Desktop settings for allowed organizations.</string>
<key>PayloadOrganization</key>
<string>Your Company Name</string>
</dict>
</plist>
com.yourcompany.docker.config to your company identifierYour Company Name with your organization namePayloadUUID with a randomly generated UUIDallowedOrgs value with your organization names (separated by semicolons)company.proxy:port with http/https proxy server host(or IP address) and portSome MDM solutions let you specify the payload as a plain dictionary of key-value settings without the full .mobileconfig wrapper:
<dict>
<key>allowedOrgs</key>
<string>first_org;second_org</string>
<key>overrideProxyHTTP</key>
<string>http://company.proxy:port</string>
<key>overrideProxyHTTPS</key>
<string>https://company.proxy:port</string>
</dict>
Use this alternative method for macOS with Docker Desktop version 4.32 and later.
{{< tabs >}} {{< tab name="Manual creation" >}}
/Library/Application Support/com.docker.docker/desktop.plist.myorg1 and myorg2 with your organization names:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>allowedOrgs</key>
<array>
<string>myorg1</string>
<string>myorg2</string>
</array>
</dict>
</plist>
Sign in required! prompt appears in Docker Desktop.{{< /tab >}} {{< tab name="Shell script deployment" >}}
Create and deploy a script for organization-wide distribution:
#!/bin/bash
# Create directory if it doesn't exist
sudo mkdir -p "/Library/Application Support/com.docker.docker"
# Write the plist file
sudo defaults write "/Library/Application Support/com.docker.docker/desktop.plist" allowedOrgs -array "myorg1" "myorg2"
# Set appropriate permissions
sudo chmod 644 "/Library/Application Support/com.docker.docker/desktop.plist"
sudo chown root:admin "/Library/Application Support/com.docker.docker/desktop.plist"
Deploy this script using SSH, remote support tools, or your preferred deployment method.
{{< /tab >}} {{< /tabs >}}
The registry.json method works across all platforms and offers flexible deployment options.
Create the registry.json file (UTF-8 without BOM) at the appropriate location:
| Platform | Location |
|---|---|
| Windows | /ProgramData/DockerDesktop/registry.json |
| Mac | /Library/Application Support/com.docker.docker/registry.json |
| Linux | /usr/share/docker-desktop/registry/registry.json |
{{< tabs >}} {{< tab name="Manual creation" >}}
registry.json file at the appropriate location for your platform.{
"allowedOrgs": ["myorg1", "myorg2"]
}
Sign in required! prompt appears in Docker Desktop.[!TIP]
If users have issues starting Docker Desktop after enforcing sign-in, they may need to update to the latest version.
{{< /tab >}} {{< tab name="Command line setup" >}}
Set-Content /ProgramData/DockerDesktop/registry.json '{"allowedOrgs":["myorg1","myorg2"]}'
sudo mkdir -p "/Library/Application Support/com.docker.docker"
echo '{"allowedOrgs":["myorg1","myorg2"]}' | sudo tee "/Library/Application Support/com.docker.docker/registry.json"
sudo mkdir -p /usr/share/docker-desktop/registry
echo '{"allowedOrgs":["myorg1","myorg2"]}' | sudo tee /usr/share/docker-desktop/registry/registry.json
{{< /tab >}} {{< tab name="Installation-time setup" >}}
Create the registry.json file during Docker Desktop installation:
# PowerShell
Start-Process '.\Docker Desktop Installer.exe' -Wait 'install --allowed-org=myorg'
# Command Prompt
"Docker Desktop Installer.exe" install --allowed-org=myorg
sudo hdiutil attach Docker.dmg
sudo /Volumes/Docker/Docker.app/Contents/MacOS/install --allowed-org=myorg
sudo hdiutil detach /Volumes/Docker
{{< /tab >}} {{< /tabs >}}
When multiple configuration methods exist on the same system, Docker Desktop uses this precedence order:
If sign-in enforcement doesn't work: