-
Notifications
You must be signed in to change notification settings - Fork 8.5k
freshness: DD deploy and enforce sign in #26227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,6 +47,16 @@ To configure the registry key method manually: | |
| 1. Restart Docker Desktop. | ||
| 1. Verify the **Sign in required!** prompt appears in Docker Desktop. | ||
|
|
||
| You can also create this key at install time with the MSI installer's | ||
| `ALLOWEDORG` property, which accepts multiple organizations separated by | ||
| semicolons: | ||
|
|
||
| ```powershell | ||
| msiexec /i "DockerDesktop.msi" /quiet /norestart ALLOWEDORG="myorg1;myorg2" | ||
| ``` | ||
|
|
||
| For more information, see [MSI installer](/manuals/desktop/enterprise/enterprise-deployment/msi-install-and-configure.md#configuration-options). | ||
|
|
||
| {{< /tab >}} | ||
| {{< tab name="Group Policy deployment" >}} | ||
|
|
||
|
|
@@ -84,8 +94,15 @@ The payload is a dictionary of key-values. Docker Desktop supports the following | |
| - `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 Mac. | ||
| > [!IMPORTANT] | ||
| > | ||
| > `allowedOrgs` must be a `<string>`, not an `<array>`. Docker Desktop only reads | ||
| > string values from a configuration profile, so an array is silently ignored and | ||
| > no enforcement happens. This differs from the | ||
| > [`.plist` method](#mac-plist-file-method), which does use an array. | ||
|
|
||
| Setting at least one of the proxy keys puts Docker Desktop's proxy into manual | ||
| mode and locks the proxy settings, so developers can't change them. | ||
|
|
||
| 1. Create a file named `docker.mobileconfig` and include the following content: | ||
| ```xml | ||
|
|
@@ -179,7 +196,7 @@ Some MDM solutions let you specify the payload as a plain dictionary of key-valu | |
| ``` | ||
| 1. Set file permissions to prevent editing by non-administrator users. | ||
| 1. Restart Docker Desktop. | ||
| 1. Verify the `Sign in required!` prompt appears in Docker Desktop. | ||
| 1. Verify the **Sign in using your work email address** prompt appears in Docker Desktop. | ||
|
|
||
| {{< /tab >}} | ||
| {{< tab name="Shell script deployment" >}} | ||
|
|
@@ -211,11 +228,11 @@ The registry.json method works across all platforms and offers flexible deployme | |
|
|
||
| ### File locations | ||
|
|
||
| Create the `registry.json` file (UTF-8 without BOM) at the appropriate location: | ||
| Create the `registry.json` file (UTF-8) at the appropriate location: | ||
|
|
||
| | Platform | Location | | ||
| | --- | --- | | ||
| | Windows | `/ProgramData/DockerDesktop/registry.json` | | ||
| | Windows | `%ProgramData%\DockerDesktop\registry.json` | | ||
| | Mac | `/Library/Application Support/com.docker.docker/registry.json` | | ||
| | Linux | `/usr/share/docker-desktop/registry/registry.json` | | ||
|
|
||
|
|
@@ -234,12 +251,10 @@ Create the `registry.json` file (UTF-8 without BOM) at the appropriate location: | |
| ``` | ||
| 1. Set file permissions to prevent user editing. | ||
| 1. Restart Docker Desktop. | ||
| 1. Verify the `Sign in required!` prompt appears in Docker Desktop. | ||
| 1. Verify the **Sign in using your work email address** prompt appears in Docker Desktop. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ?? why is this red
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no idea. lol |
||
|
|
||
| > [!TIP] | ||
| > | ||
| > If users have issues starting Docker Desktop after enforcing sign-in, | ||
| > they may need to update to the latest version. | ||
| 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" >}} | ||
|
|
@@ -271,17 +286,27 @@ Create the registry.json file during Docker Desktop installation: | |
|
|
||
| #### Windows | ||
|
|
||
| `--allowed-org` is a flag on the EXE installer. If you deploy with the MSI | ||
| installer, use the `ALLOWEDORG` property instead, which creates the | ||
| [registry key](#windows-registry-key-method). | ||
|
|
||
| ```shell | ||
| # PowerShell | ||
| Start-Process '.\Docker Desktop Installer.exe' -Wait 'install --allowed-org=myorg' | ||
|
|
||
| # Command Prompt | ||
| "Docker Desktop Installer.exe" install --allowed-org=myorg1 | ||
| ``` | ||
| The `--allowed-org` flag accepts only one organization. To enforce sign-in for multiple organizations on Mac, configure the `registry.json` file after installation. | ||
|
|
||
| > [!NOTE] | ||
| > [!IMPORTANT] | ||
| > | ||
| > The `--allowed-org` flag accepts only one organization. To enforce sign-in for multiple organizations on Mac, configure the `registry.json` file after installation. | ||
| > With Docker Desktop version 4.83 and later, `--allowed-org` can't be combined | ||
| > with `--user`, and it can't be used for a Microsoft Store installation. Both | ||
| > are per-user installations and the installer rejects the combination. This | ||
| > matters because the Windows installer selects a per-user installation by | ||
| > default from version 4.83. For per-user installations, configure the | ||
| > `registry.json` file after installation. | ||
|
|
||
| #### Mac | ||
|
|
||
|
|
@@ -290,28 +315,60 @@ sudo hdiutil attach Docker.dmg | |
| sudo /Volumes/Docker/Docker.app/Contents/MacOS/install --allowed-org=myorg | ||
| sudo hdiutil detach /Volumes/Docker | ||
| ``` | ||
| > [!NOTE] | ||
| > | ||
| > The `--allowed-org` flag accepts only one organization. To enforce sign-in for multiple organizations on Mac, configure the `registry.json` file after installation. | ||
|
|
||
| The `--allowed-org` flag accepts only one organization. To enforce sign-in for multiple organizations on Mac, configure the `registry.json` file after installation. | ||
|
|
||
| {{< /tab >}} | ||
| {{< /tabs >}} | ||
|
|
||
| ## Method precedence | ||
|
|
||
| When multiple configuration methods exist on the same system, Docker Desktop uses this precedence order: | ||
| When more than one configuration method exists on the same machine, Docker | ||
| Desktop evaluates them in order and stops at the first one that's configured. | ||
| The order depends on the platform. | ||
|
|
||
| | Platform | Precedence order | | ||
| |:---------|:-----------------| | ||
| | Windows | 1. Registry key<br>2. `registry.json`<br>3. `admin-settings.json` | | ||
| | Mac | 1. Configuration profile<br>2. `desktop.plist`<br>3. `registry.json`<br>4. `admin-settings.json` | | ||
| | Linux | 1. `registry.json`<br>2. `admin-settings.json` | | ||
|
|
||
| Lower-precedence methods are not consulted once a higher one applies. For | ||
| example, on a Mac with both a configuration profile and a `registry.json` file, | ||
| only the organizations in the configuration profile are enforced. | ||
|
|
||
| ## Settings Management and sign-in enforcement | ||
|
|
||
| 1. Registry key (Windows only) | ||
| 1. Configuration profiles (Mac only) | ||
| 1. plist file (Mac only) | ||
| 1. registry.json file | ||
| Deploying an `admin-settings.json` file enforces sign-in on its own, even if the | ||
| file contains no organization list. Users who aren't on a Docker Business | ||
| subscription see the sign-in prompt, and the Docker Engine is held until they | ||
| sign in. | ||
|
|
||
| This differs from the four methods above in two ways: | ||
|
|
||
| - It doesn't restrict sign-in to particular organizations, so any Docker account | ||
| satisfies it. Combine it with one of the methods above if you need organization | ||
| membership enforced. | ||
| - It's the lowest-precedence method, so any of the methods above overrides it. | ||
|
|
||
| If you use [Settings Management](/manuals/desktop/enterprise/hardened-desktop/settings-management/_index.md), account for this when planning your rollout: developers who are signed out will be prompted to sign in as soon as the file reaches their machine and Docker Desktop restarts. | ||
|
|
||
| ## Troubleshoot sign-in enforcement | ||
|
|
||
| If sign-in enforcement doesn't work: | ||
|
|
||
| - Verify file locations and permissions | ||
| - Check that organization names use lowercase letters | ||
| - Restart Docker Desktop or reboot the system | ||
| - Check that organization names use lowercase letters and match your Docker Hub | ||
| organization name exactly. Matching is case-sensitive, so a mismatch signs out | ||
| every user | ||
| - Check for stray whitespace in the value. In the Windows registry key, put each | ||
| organization on its own line rather than separating them with spaces or commas | ||
| - Check whether a higher-precedence method is in effect. See | ||
| [Method precedence](#method-precedence) | ||
| - Restart Docker Desktop or reboot the system. Docker Desktop doesn't pick up new | ||
| configuration while running | ||
| - Confirm users are members of the specified organizations | ||
| - Update Docker Desktop to the latest version | ||
|
|
||
| If enforcement works but developers report that the Docker CLI stopped working, | ||
| that's expected. See [Impact on the Docker CLI](_index.md#impact-on-the-docker-cli). | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.