Docker の検索・質問

Install Docker Desktop on Windows

Get started with Docker for Windows. This guide covers system requirements, where to download, and instructions on how to install and update.

マークダウン参照

Docker Desktop 契約条項

より大きなエンタープライズ向け(従業員 250 名以上、あるいは年間収益 1 千万 US ドル以上)に Docker Desktop を商用利用する場合は、有償サブスクリプション が必要です。

このページでは Docker Desktop for Windows をインストールするための、ダウンロードリンク、システム要件、インストール手順について説明します。

Docker Desktop for Windows - x86_64 Docker Desktop for Windows - x86_64 on the Microsoft Store Docker Desktop for Windows - Arm (Early Access)

チェックサムについては リリースノート を参照してください。

システム要件

情報

どちらのバックエンドを使うべきか?

Docker Desktop for Windows supports three backends: WSL 2, Hyper-V, and Docker VMM. WSL 2 is the default and works for most users without administrator privileges. Hyper-V is only available with all-users installation. Docker VMM is a container-optimized hypervisor that reclaims idle memory and improves file I/O. For more information, see Virtual Machine Manager .

  • WSL version 2.1.5 or later. To check your version, see WSL: Verification and setup
  • If you intend to use Enhanced Container Isolation, ensure you’re using WSL version 2.6 or later. This is required because ECI depends on a Linux kernel version of at least 6.3.0, and WSL 2.6+ bundles Linux kernel version 6.6.
  • Windows 10 64-bit: Enterprise, Pro, or Education version 22H2 (build 19045).
  • Windows 11 64-bit: Enterprise, Pro, or Education version 23H2 (build 22631) or higher.
  • The Windows Server service (LanmanServer) must be enabled and its start mode set to Automatic.
  • Turn on the WSL 2 feature on Windows. For detailed instructions, refer to the Microsoft documentation .
  • The following hardware prerequisites are required to successfully run WSL 2 on Windows 10 or Windows 11:

For more information on setting up WSL 2 with Docker Desktop, see WSL .

メモ

Docker only supports Docker Desktop on Windows for those versions of Windows that are still within Microsoft’s servicing timeline . Docker Desktop is not supported on server versions of Windows, such as Windows Server 2019 or Windows Server 2022. For more information on how to run containers on Windows Server, see Microsoft's official documentation .

重要

To run Windows containers , you need Windows 10 or Windows 11 Professional or Enterprise edition. Windows Home or Education editions only allow you to run Linux containers.

  • Windows 10 64-bit: Enterprise, Pro, or Education version 22H2 (build 19045).

  • Windows 11 64-bit: Enterprise, Pro, or Education version 23H2 (build 22631) or higher.

  • The Windows Server service (LanmanServer) must be enabled and its start mode set to Automatic.

  • Turn on Hyper-V and Containers Windows features.

  • The following hardware prerequisites are required to successfully run Client Hyper-V on Windows 10:

メモ

Docker only supports Docker Desktop on Windows for those versions of Windows that are still within Microsoft’s servicing timeline . Docker Desktop is not supported on server versions of Windows, such as Windows Server 2019 or Windows Server 2022. For more information on how to run containers on Windows Server, see Microsoft's official documentation .

重要

To run Windows containers , you need Windows 10 or Windows 11 Professional or Enterprise edition. Windows Home or Education editions only allow you to run Linux containers.

  • The same Windows versions as the WSL 2 backend.
  • The Windows Hypervisor Platform and Virtual Machine Platform Windows features turned on. The all-users installer turns them on for you, and might ask you to restart Windows. A per-user installation can't turn on Windows Hypervisor Platform, so an administrator must turn it on first.
  • Hardware virtualization enabled in BIOS/UEFI. Inside a virtual machine, the host must expose nested virtualization.
  • Docker VMM doesn't require the Hyper-V feature, and isn't supported on Arm. On Arm, the installer uses WSL 2 instead.

For more information, see Virtual Machine Manager .

  • WSL version 2.1.5 or later. To check your version, see WSL: Verification and setup
  • Windows 10 64-bit: Enterprise, Pro, or Education version 22H2 (build 19045).
  • Windows 11 64-bit: Enterprise, Pro, or Education version 23H2 (build 22631) or higher.
  • The Windows Server service (LanmanServer) must be enabled and its start mode set to Automatic.
  • Turn on the WSL 2 feature on Windows. For detailed instructions, refer to the Microsoft documentation .
  • The following hardware prerequisites are required to successfully run WSL 2 on Windows 10 or Windows 11:
重要

Windows containers are not supported.

Containers and images created with Docker Desktop are shared between all user accounts on machines where it is installed. This is because all Windows accounts use the same VM to build and run containers. Note that it is not possible to share containers and images between user accounts when using the Docker Desktop WSL 2 backend.

Running Docker Desktop inside a VMware ESXi or Azure VM is supported for Docker Business customers. It requires enabling nested virtualization on the hypervisor first. For more information, see Running Docker Desktop in a VM or VDI environment .

Install Docker Desktop on Windows

Installation modes

Docker Desktop supports two installation modes, per-user and all users. Per-user installation is recommended for most users and is selected by default in the installer. It does not require administrator privileges to install or update, and the WSL 2 backend it uses covers the needs of the vast majority of Docker Desktop users.

Per-user (recommended)All users
Install location%LOCALAPPDATA%\Programs\DockerDesktopC:\Program Files\Docker\Docker
Registry keysCurrent User (HKCU)Local Machine (HKLM)
Admin rights to installNot requiredRequired
Admin rights to updateNot requiredRequired
Linux containers backendWSL 2 or Docker VMMWSL 2, Hyper-V, or Docker VMM
Windows containersNot supportedSupported
SecuritySmaller attack surface; no privileged system service installedRequires privileged system service; broader access to host resources

For more information, see Understand permission requirements for Windows .

対話的なインストール

  1. ページ最上部にあるダウンロードボタンをクリックしてインストーラーをダウンロードするか、あるいは リリースノート ページからダウンロードします。

  2. Docker Desktop Installer.exe をダブルクリックしてインストーラーを起動します。 インストールにおいては、どのインストールモードを選ぶかが問われます。 個別ユーザー向けのインストールを選ぶと %LOCALAPPDATA%\Programs\DockerDesktop にインストールされるので、管理者権限を必要としません。 全ユーザー向けを選んだ場合は、管理者権限となるための画面が表示されます。

    メモ

    後々インストールモードを切り替えたいと思った場合は、Docker Desktop を一度アンインストールしてから再インストールする必要があります。

  3. プロンプト画面が表示されたら、Configuration ページから目的とするバックエンドを選んでください。WSL 2 を選ぶ場合は Use WSL 2 instead of Hyper-V (Hyper-V の代わりに WSL 2 を利用) を選んでください。Hyper-V を選ぶ場合は、何も選択せずそのままにしておいてください。インストール後であっても Docker VMM を切り替えたい場合は、Settings > General から行うことができます。

    With version 4.97 and later, the Configuration page lists the backends as options. Per-user installation offers WSL 2 and Docker VMM. All-users installation offers WSL 2, Hyper-V, and Docker VMM.

    バックエンドを一つしかサポートしないシステムでは、Docker Desktop が利用可能なオプションを自動的に選択します。

  4. インストールウィザードの手順に従ってインストーラーを承認して、インストールを完了させます。

  5. インストールが正常に行われたら Close をクリックして作業を終了します。

  6. Docker Desktop の起動 を行います。

コマンドラインからのインストール

Docker Desktop Installer.exe をダウンロードしたら、端末から以下のコマンドを実行して Docker Desktop を %LOCALAPPDATA%\Programs\DockerDesktop にインストールします。

個別ユーザー向けのインストールは以下のようにします。

$ "Docker Desktop Installer.exe" install --user

全ユーザー向けのインストールは以下のようにします (管理者権限が必要です)。

$ "Docker Desktop Installer.exe" install

PowerShell を利用している場合は以下を実行します。

# Per-user installation (no admin required)
Start-Process 'Docker Desktop Installer.exe' -Wait -ArgumentList 'install', '--user'

# All-users installation (run as administrator)
Start-Process 'Docker Desktop Installer.exe' -Wait install

Windows コマンドプロンプトの利用時は以下を実行します。

# Per-user installation (no admin required)
start /w "" "Docker Desktop Installer.exe" install --user

# All-users installation (run as administrator)
start /w "" "Docker Desktop Installer.exe" install

全ユーザー向けインストールにあたって、管理者ユーザーアカウントと操作ユーザーアカウントが異なる場合は、その操作ユーザーを docker-users グループに追加する必要があります。 そうすることによって、より厳しい権限を必要とする、たとえば Hyper-VM の生成管理や Windows コンテナーの生成などを行うことができるようになります。

$ net localgroup docker-users <user> /add
警告

Membership in docker-users grants access to the Docker daemon socket, which is equivalent to granting administrative privileges on the host. Only add users who require access to Windows containers or Hyper-V VM management. For Linux containers using the WSL 2 backend, this group membership is not required. See Protect the Docker daemon socket for more information.

If you're deploying via MDM (such as Intune) and the docker-users group isn't populated automatically, see Why isn't the docker-users group populated when the MSI is installed with Intune or another MDM solution? .

install コマンドがどのようなフラグを受け付けるかについては インストーラーのフラグ の節を参照してください。

メモ

後々インストールモードを切り替えたいと思った場合は、Docker Desktop を一度アンインストールしてから再インストールする必要があります。

Docker Desktop の起動

インストール直後の Docker Desktop は、自動的には起動されません。 Docker Desktop を起動するには、以下を実行します。

  1. Docker を検索し、検索結果の中から Docker Desktop を選択します。

  2. Docker メニュー ( クジラメニュー ) には、Docker Subscription Service Agreement(サブスクリプションサービス契約)画面が表示されます。

    以下にキーポイントを示します。

    • Docker Desktop は小規模ビジネス (従業員 250 名未満かつ年間収益 1 千万 US ドル未満) 向け、個人利用、教育目的、非商用のオープンソースプロジェクト向けは無償利用可能です。
    • それ以外はプロフェッショナル向けとしてサブスクリプション購入が必要です。
    • サブスクリプション購入は政府機関に対しても必要です。
    • Docker Pro、Team、Business の各サブスクリプションでは Docker Desktop の商用利用が可能です。
  3. Accept を選びます。 契約条項を受け入れれば Docker Desktop が起動します。

    契約条項への同意がなければ Docker Desktop を起動させることはできません。 後日 Docker Desktop を開いたときに、改めて契約条項に同意することができます。

    詳しくは Docker Desktop サブスクリプションサービス契約 を参照してください。 FAQ を読むこともお勧めします。

情報

IT 管理者としては、エンドポイント管理 (MDM) ソフトウェアを使えば、環境内の Docker Desktop インスタンスとそのバージョンを識別できるようになります。 この機能によって正確なライセンス情報を得ることができ、Docker Desktop の最新バージョンを常に利用できるようになります。 また 強制的なサインイン の機能もあります。

Advanced system configuration and installation options

WSL: Verification and setup

If you have chosen to use WSL, first verify that your installed version meets system requirements by running the following command in your terminal:

wsl --version

If version details do not appear, you are likely using the inbox version of WSL. This version does not support modern capabilities and must be updated.

You can update or install WSL using one of the following methods:

Option 1: Install or update WSL via the terminal

  1. Open PowerShell or Windows Command Prompt in administrator mode.
  2. Run either the install or update command. You may be prompted to restart your machine. For more information, refer to Install WSL .
wsl --install

wsl --update

Option 2: Install WSL via the MSI package

If Microsoft Store access is blocked due to security policies:

  1. Go to the official WSL GitHub Releases page .
  2. Download the .msi installer from the latest stable release (under the Assets drop-down).
  3. Run the downloaded installer and follow the setup instructions.

インストーラーのフラグ

メモ

If you're using PowerShell, you need to use the ArgumentList parameter before any flags. For example:

Start-Process 'Docker Desktop Installer.exe' -Wait -ArgumentList 'install', '--accept-license'

インストール動作

  • --user: Docker Desktop を個別ユーザーモードで %LOCALAPPDATA%\Programs\DockerDesktop にインストールします。この場合は管理者権限を必要としません。たいていはこのモードが推奨されます。詳しくは インストールモード を参照してください。
  • --quiet: インストーラーの起動時に情報出力を省略します。
  • --accept-license: Docker サブスクリプションサービス契約 をここで受け入れます。これを行わない場合は、アプリケーションの初回起動時に行うことになります。
  • --installation-dir=<パス>: デフォルトのインストール先 (C:\Program Files\Docker\Docker) を変更します。
  • --backend=<バックエンド名>: Docker Desktop が利用するデフォルトのバックエンドを指定します。 wsl-2 (デフォルト)、hyper-v、windows、docker-vmm (x86_64 のみ) のいずれか。 バージョン 4.97 またはそれ以降の場合、docker-vmm は --user フラグと併用できます。 また hyper-v と windows は --user フラグと併用できます。
  • --always-run-service: インストール完了後に com.docker.service を起動し、このサービスの起動タイプを Automatic (自動) に設定します。 これによって管理者権限がなくても稼働できるようになります。 これがなかった場合 com.docker.service の起動には管理者権限が必要です。 com.docker.service は Windows コンテナーと Hyper-V バックエンドのために必要となります。

セキュリティとアクセス制御

  • --allowed-org=<組織の名前空間>: アプリケーションの実行にあたっては、ユーザーがサインインしていること、そして指定された Docker Hub の 組織の名前空間 であることを要求します。 ここにおいては組織の表示名ではなく名前空間を用います。 設定の詳細については Configure sign-in enforcement を参照してください。
  • --admin-settings: admin が利用する admin-settings.json ファイルを自動生成します。 これは組織内にあるクライアントマシン上の Docker Desktop における特定設定項目を制御するものです。 詳しくは 設定管理 を参照してください。
    • これは --allowed-org=<組織の名前空間> フラグとともに用いなければなりません。
    • たとえば以下のとおりです。 --allowed-org=<組織の名前空間> --admin-settings="{'configurationFileVersion': 2, 'enhancedContainerIsolation': {'value': true, 'locked': false}}"
  • --no-windows-containers: Windows コンテナー統合機能を無効にします。 これによってセキュリティを向上させます。 これは --backend=windows と同時に指定することはできません。 詳しくは Windows コンテナー を参照してください。

プロキシー設定

  • --proxy-http-mode=<mode>: HTTP プロキシーモードを設定します。system (デフォルト) または manual です。
  • --override-proxy-http=<URL>: HTTP リクエストに対して用いられる HTTP プロキシーの URL を設定します。 --proxy-http-mode を manual に設定しておく必要があります。
  • --override-proxy-https=<URL>: HTTPS リクエストに対して用いられる HTTP プロキシーの URL を設定します。 --proxy-http-mode を manual に設定しておく必要があります。
  • --override-proxy-exclude=<hosts/domains>: ホストとドメインに対するプロキシー設定をバイパスします。 カンマ区切りのリストとして指定します。
  • --proxy-enable-kerberosntlm: Kerberos と NTLM プロキシー認証を有効にします。 これを有効にすると Kerberos/NTLM 認証への設定がプロキシーサーバーに対して適切に設定されます。 Docker Desktop 4.32 またはそれ以降において利用可能です。
  • --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.
PAC ファイルの設定例
"Docker Desktop Installer.exe" install --proxy-http-mode="manual" --override-proxy-pac="http://localhost:8080/myproxy.pac"
PAC スクリプトの設定例
"Docker Desktop Installer.exe" install --proxy-http-mode="manual" --override-proxy-embedded-pac="function FindProxyForURL(url, host) { return \"DIRECT\"; }"

Data root and disk location

  • --hyper-v-default-data-root=<パス>: Hyper-V VM ディスクのデフォルトパスを指定します。
  • --windows-containers-default-data-root=<パス>: Windows コンテナーのデフォルトパスを指定します。
  • --wsl-default-data-root=<path>: WSL 配布ディスクのデフォルトパスを指定します。

管理者権限

In per-user mode, Docker Desktop can be installed and updated without administrator privileges. Some settings still require elevation and are marked Requires password in the Settings UI. Enabling WSL 2 for the first time also requires administrator privileges, but this is a one-time, per-machine operation.

In all-users mode, installing Docker Desktop requires administrator privileges. However, once installed, it can be used without administrative access. Some actions, though, still need elevated permissions. See Understand permission requirements for Windows for more detail.

See the FAQs on how to install and run Docker Desktop without needing administrator privileges.

If you're an IT admin and your users do not have administrator rights and plan to perform operations that require elevated privileges, be sure to install Docker Desktop using the --always-run-service installer flag. This ensures those actions can still be executed without prompting for User Account Control (UAC) elevation. See Installer Flags for more detail.

Windows containers

メモ

Windows コンテナーは全ユーザー向けインストールモードにおいてのみサポートされます。 Docker Desktop を個別ユーザー向けにインストールしている場合は利用することはできません。

From the Docker Desktop menu, you can toggle which daemon (Linux or Windows) the Docker CLI talks to. Select Switch to Windows containers to use Windows containers, or select Switch to Linux containers to use Linux containers (the default).

For more information on Windows containers, refer to the following documentation:

メモ

When you switch to Windows containers, Settings only shows those tabs that are active and apply to your Windows containers.

If you set proxies or daemon configuration in Windows containers mode, these apply only on Windows containers. If you switch back to Linux containers, proxies and daemon configurations return to what you had set for Linux containers. Your Windows container settings are retained and become available again when you switch back.

次に読むものは