WSL 2 ON Windows Docker Desktop インストール

Windows 上での WSL2 機能の有効化

PowerShell または Windows コマンド プロンプトを管理者モード

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

新しいクロスプラットフォームの PowerShell をお試しください https://aka.ms/pscore6

PS C:\Windows\system32> wsl --install
インストール中: 仮想マシン プラットフォーム
仮想マシン プラットフォーム はインストールされました。
インストール中: Linux 用 Windows サブシステム
Linux 用 Windows サブシステム  はインストールされました。
インストール中: Linux 用 Windows サブシステム
Linux 用 Windows サブシステム  はインストールされました。
インストール中: Ubuntu
Ubuntu はインストールされました。
要求された操作は正常に終了しました。変更を有効にするには、システムを再起動する必要があります。
PS C:\Windows\system32>

再起動後にinstallされたubuntuで利用するusernameとpasswordを新規に設定する

Ubuntu は既にインストールされています。
Ubuntu を起動しています...
Installing, this may take a few minutes...
Please create a default UNIX user account. The username does not need to match your Windows username.
For more information visit: https://aka.ms/wslusers
Enter new UNIX username: ********
New password:
Retype new password:
passwd: password updated successfully
Installation successful!
To run a command as administrator (user "root"), use "sudo ".
See "man sudo_root" for details.

Welcome to Ubuntu 22.04.2 LTS (GNU/Linux 5.15.90.1-microsoft-standard-WSL2 x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage


This message is shown once a day. To disable it please create the
/home/********/.hushlogin file.
tooru@DESKTOP-BSQNE7C:~$

Linux カーネル更新プログラム パッケージをダウンロードする

x64 マシン用 WSL2 Linux カーネル更新プログラム パッケージ

Docker Desktop for Windows install

Docker Desktop WSL 2 backend

docker desktop 設定

  • Windows スタート・メニューから Docker Desktop をスタートします。

  • Docker メニューから、 Settings > General を選択します。

  • User WSL 2 based engine (WSL2 対応エンジンを使う) のチェックボックスを選択します。

WSL 2 をサポートしているシステム上に Docker Desktop をインストールした場合は、デフォルトでこのオプションが有効化されています。

  • *Apply & Restart (適用と再起動)をクリックします。
created:

Back to top