2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Windows 端末に Docker 環境を構築する最短手順まとめ(WSL2 + Docker Desktop)

2
Last updated at Posted at 2026-05-01

Windows で Docker を使う場合、もっとも簡単で安定する構成は WSL2 + Docker Desktop の組み合わせです。
この記事では、余計な説明を省きつつ「最短で Docker を動かす」ための手順だけをまとめます。

とりあえず自分用にメモしておきます。

🧩 前提条件

  • Windows 10(21H2 以降)または Windows 11

  • 管理者権限あり

  • インターネット接続

1. WSL2 を有効化する

① WSL を有効化

PowerShell(管理者)で以下を実行:

powershell
wsl --install

これで以下が自動で有効化される:

  • WSL 本体

  • 仮想マシンプラットフォーム

  • Ubuntu(デフォルトディストリビューション)

② 再起動

指示に従って Windows を再起動。

2. Docker Desktop をインストール

① 公式サイトからダウンロード

Docker Desktop for Windows
https://www.docker.com/products/docker-desktop/ (docker.com in Bing)


(追記:コメントいただいたコマンドを反映)

winget install -e --id Docker.DockerDesktop

② インストール時のポイント

  • 「Use WSL 2 instead of Hyper-V」にチェック

  • 「Enable integration with my default WSL distro」にチェック

3. WSL2 と Docker の連携設定

Docker Desktop を起動し、
Settings → Resources → WSL Integration を開く。

  • Ubuntu(または使用中のディストロ)を ON にする

これで WSL 内から docker コマンドが直接使えるようになる。

4. 動作確認

① バージョン確認

bash
docker --version

② テストコンテナの起動

bash
docker run hello-world

「Hello from Docker!」が表示されれば成功。

🎉 まとめ

  • WSL2 を有効化

  • Docker Desktop をインストール

  • WSL 連携を ON

  • hello-world で動作確認

この 4 ステップで Windows でも Linux コンテナを快適に扱えるようになります。

2
0
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?