Windows への Docker Desktop のインストール
Docker Desktop 契約条項
より大きなエンタープライズ向け(従業員 250 名以上、あるいは年間収益 1 千万 US ドル以上)に Docker Desktop を商用利用する場合は、有償サブスクリプション が必要です。
このページでは Docker Desktop for Windows をインストールするための、ダウンロードリンク、システム要件、インストール手順について説明します。
Docker Desktop for Windows - x86_64 Microsoft Store 上の Docker Desktop for Windows - x86_64 Docker Desktop for Windows - Arm (早期アクセス)
チェックサムについては リリースノート を参照してください。
システム要件
情報Hyper-V または WSL を使うべきか?
Docker Desktop は WSL 上でも Hyper-V 上でも、アーキテクチャーに関係なく同様に機能します。 Hyper-V と WSL にはそれぞれに利点と欠点があり、それは設定内容や利用形態により変化します。
- WSL バージョン 2.1.5 またはそれ以降。バージョンをチェックするには WSL: Verification and setup を参照。
- Windows 10 64 ビット: Enterprise, Pro, Education バージョン 22H2 (ビルド 19045)。
- Windows 11 64 ビット: Enterprise, Pro, Education バージョン 23H2 (ビルド22631) またはそれ以降。
- Windows 上での WSL 2 機能を有効化すること。 詳しい手順については Microsoft のドキュメント を参照してください。
- Windows 10 または Windows 11 上の WSL 2 を正常動作させるためには、以下のハードウェア要件が必要。
- 第 2 レベルのアドレス変換 (Second Level Address Translation; SLAT) に対応した 64 ビットプロセッサー。
- 4GB システム RAM
- BIOS/UEFI におけるハードウェア仮想機能の有効化。 詳しくは 仮想化 を参照してください。
Docker Desktop を用いる際の WSL 2 の設定に関する詳細は WSL を参照してください。
メモDocker がサポートする Docker Desktop on Windows は、Windows バージョンが Microsoft のサービスタイムライン に含まれているもののみです。 Docker Desktop は Windows Server 2019 や Windows Server 2022 といったサーバーバージョンに対してはサポートされていません。 Windows Server 上においてコンテナーを実行する方法については Microsoftの公式ドキュメント を参照してください。
重要Windows コンテナー を実行する場合は、Windows 10 または Windows 11 の Professional または Enterprise エディションが必要です。 Windows Home または Education エディションでは Linux コンテナーしか動作させることはできません。
Windows 10 64 ビット: Enterprise, Pro, Education バージョンの 22H2 (ビルド 19045)。
Windows 11 64 ビット: Enterprise, Pro, Education バージョンの 23H2 (ビルド 22631) またはそれ以降。
Windows 上での Hyper-V およびコンテナーウィンドウ機能を有効化すること。
Windows 10 上のクライアント Hyper-V を正常動作させるためには、以下のハードウェア要件が必要。
- 第 2 レベルのアドレス変換 (Second Level Address Translation; SLAT) に対応した 64 ビットプロセッサー。
- 4GB システム RAM
- BIOS/UEFI におけるハードウェア仮想機能の有効化。 詳しくは 仮想化 を参照してください。
メモDocker がサポートする Docker Desktop on Windows は、Windows バージョンが Microsoft のサービスタイムライン に含まれているもののみです。 Docker Desktop は Windows Server 2019 や Windows Server 2022 といったサーバーバージョンに対してはサポートされていません。 Windows Server 上においてコンテナーを実行する方法については Microsoftの公式ドキュメント を参照してください。
重要Windows コンテナー を実行する場合は、Windows 10 または Windows 11 の Professional または Enterprise エディションが必要です。 Windows Home または Education エディションでは Linux コンテナーしか動作させることはできません。
- WSL バージョン 2.1.5 またはそれ以降。バージョンをチェックするには WSL: Verification and setup を参照。
- Windows 10 64 ビット: Enterprise, Pro, Education バージョン 22H2 (ビルド 19045)。
- Windows 11 64 ビット: Enterprise, Pro, Education バージョン 23H2 (ビルド 22631) またはそれ以降。
- Windows 上での WSL 2 機能を有効化すること。 詳しい手順については Microsoft のドキュメント を参照してください。
- Windows 10 または Windows 11 上の WSL 2 を正常動作させるためには、以下のハードウェア要件が必要。
- 第 2 レベルのアドレス変換 (Second Level Address Translation; SLAT) に対応した 64 ビットプロセッサー。
- 4GB システム RAM
- BIOS/UEFI におけるハードウェア仮想機能の有効化。 詳しくは 仮想化 を参照してください。
重要Windows コンテナーはサポートされていません。
Docker Desktop を使って生成されたコンテナーやイメージは、Docker Desktop がインストールされているマシン上であれば、全ユーザーアカウントが共有できます。 これは Windows アカウントが同一の VM を使って、コンテナーのビルドや実行を行うからです。 ただし Docker Desktop WSL 2 バックエンドを利用している場合は、ユーザーアカウント間でコンテナーやイメージは共有できません。
Docker Desktop を VMware ESXi あるいは Azure VM において動作させるのは、Docker Business 購入者に対してサポートされています。 これを利用するには、まずハイパーバイザー内においてネスト化仮想環境を有効にする必要があります。 詳しくは VM または VDI 環境での Docker Desktop の実行 を参照してください。
Windows への Docker Desktop のインストール
対話的なインストール
ページ最上部にあるダウンロードボタンをクリックしてインストーラーをダウンロードするか、あるいは リリースノート ページからダウンロードします。
Docker Desktop Installer.exeをダブルクリックしてインストーラーを起動します。 デフォルトで Docker はC:\Program Files\Docker\Dockerにインストールされます。プロンプト画面が表示されたら、バックエンドでの選択状況に従って Configuration ページにおける Use WSL 2 instead of Hyper-V オプションのオンオフが設定されていることを確認してください。
バックエンドを一つしかサポートしないシステムでは、Docker Desktop が利用可能なオプションを自動的に選択します。
インストールウィザードの手順に従ってインストーラーを承認して、インストールを完了させます。
インストールが正常に行われたら Close をクリックして作業を終了します。
Docker Desktop の起動 を行います。
利用しているユーザーアカウントが管理アカウントではない場合、docker-users グループにユーザーを追加する必要があります。 これによって Hyper-V VM の生成管理といった、より高権限を必要とする機能にアクセスできます。 これを行わない場合には Windows コンテナーを利用することになります。
- administrator (管理者) 権限により Computer Management (コンピューター管理) を開きます。
- Local Users and Groups > Groups > docker-users を順に開きます。
- 右クリックによってユーザーをそのグループに追加します。
- 設定変更を有効にするため、いったんサインアウトした上で再度サインインします。
コマンドラインからのインストール
Docker Desktop Installer.exe をダウンロードしたら、端末から以下のコマンドを実行して Docker Desktop をインストールします。
$ "Docker Desktop Installer.exe" install
PowerShell を利用している場合は以下を実行します。
Start-Process 'Docker Desktop Installer.exe' -Wait installWindows コマンドプロンプトの利用時は以下を実行します。
start /w "" "Docker Desktop Installer.exe" installデフォルトで Docker Desktop は C:\Program Files\Docker\Docker にインストールされます。
利用しているユーザーアカウントが管理アカウントではない場合、docker-users グループにユーザーを追加する必要があります。 これによって Hyper-V VM の生成管理といった、より高権限を必要とする機能にアクセスできます。 これを行わない場合には Windows コンテナーを利用することになります。
$ net localgroup docker-users <user> /add
install コマンドがどのようなフラグを受け付けるかについては インストーラーのフラグ の節を参照してください。
Docker Desktop の起動
インストール直後の Docker Desktop は、自動的には起動されません。 Docker Desktop を起動するには、以下を実行します。
Docker を検索し、検索結果の中から Docker Desktop を選択します。
Docker メニュー (
) には、Docker Subscription Service Agreement(サブスクリプションサービス契約)画面が表示されます。
以下にキーポイントを示します。
- Docker Desktop は小規模ビジネス (従業員 250 名未満かつ年間収益 1 千万 US ドル未満) 向け、個人利用、教育目的、非商用のオープンソースプロジェクト向けは無償利用可能です。
- それ以外はプロフェッショナル向けとしてサブスクリプション購入が必要です。
- サブスクリプション購入は政府機関に対しても必要です。
- Docker Pro、Team、Business の各サブスクリプションでは Docker Desktop の商用利用が可能です。
Accept を選びます。 契約条項を受け入れれば Docker Desktop が起動します。
契約条項への同意がなければ Docker Desktop を起動させることはできません。 後日 Docker Desktop を開いたときに、改めて契約条項に同意することができます。
詳しくは Docker Desktop サブスクリプションサービス契約 を参照してください。 FAQ を読むこともお勧めします。
情報
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
- Open PowerShell or Windows Command Prompt in administrator mode.
- 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:
- Go to the official WSL GitHub Releases page.
- Download the
.msiinstaller from the latest stable release (under the Assets drop-down). - Run the downloaded installer and follow the setup instructions.
インストーラーのフラグ
メモIf you're using PowerShell, you need to use the
ArgumentListparameter before any flags. For example:Start-Process 'Docker Desktop Installer.exe' -Wait -ArgumentList 'install', '--accept-license'
インストール動作
--quiet: インストーラーの起動時に情報出力を省略します。--accept-license: Docker サブスクリプションサービス契約 をここで受け入れます。これを行わない場合は、アプリケーションの初回起動時に行うことになります。--installation-dir=<パス>: デフォルトのインストール先 (C:\Program Files\Docker\Docker) を変更します。--backend=<バックエンド名>: Docker Desktop が利用するデフォルトのバックエンドを指定します。hyper-v、windows、wsl-2(デフォルト) のいずれか。--always-run-service: インストール完了後にcom.docker.serviceを起動し、このサービスの起動タイプを Automatic (自動) に設定します。 これによって管理者権限がなくても稼働できるようになります。 これがなかった場合com.docker.serviceの起動には管理者権限が必要です。com.docker.serviceは Windows コンテナーと Hyper-V バックエンドのために必要となります。
セキュリティとアクセス制御
--allowed-org=<組織名>: アプリケーションの実行にあたっては、ユーザーがサインインしていることを要求し、指定された Docker Hub 組織のメンバーであることを要求します。--admin-settings: admin が利用するadmin-settings.jsonファイルを自動生成します。 これは組織内にあるクライアントマシン上の Docker Desktop における特定設定項目を制御するものです。 詳しくは 設定管理 を参照してください。- これは
--allowed-org=<組織名>フラグとともに用いなければなりません。 - たとえば以下のとおりです。
--allowed-org=<org name> --admin-settings="{'configurationFileVersion': 2, 'enhancedContainerIsolation': {'value': true, 'locked': false}}"
- これは
--no-windows-containers: 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 usingmanualproxy mode.--override-proxy-embedded-pac=<PAC script>: Specifies an embedded PAC (Proxy Auto-Config) script. This setting takes effect only when usingmanualproxy mode and has precedence over the--override-proxy-pacflag.
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 配布ディスクのデフォルトパスを指定します。
管理者権限
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
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:
Microsoft documentation on Windows containers.
Build and Run Your First Windows Server Container (Blog Post) gives a quick tour of how to build and run native Docker Windows containers on Windows 10 and Windows Server 2016 evaluation releases.
Getting Started with Windows Containers (Lab) shows you how to use the MusicStore application with Windows containers. The MusicStore is a standard .NET application and, forked here to use containers, is a good example of a multi-container application.
To understand how to connect to Windows containers from the local host, see I want to connect to a container from Windows
メモ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.
次に読むものは
- Explore Docker's subscriptions to see what Docker can offer you.
- Get started with Docker.
- Explore Docker Desktop and all its features.
- Troubleshooting describes common problems, workarounds, and how to get support.
- FAQs provide answers to frequently asked questions.
- Release notes lists component updates, new features, and improvements associated with Docker Desktop releases.
- Back up and restore data provides instructions on backing up and restoring data related to Docker.