1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Docker on WSL2 備忘録

1
Last updated at Posted at 2019-12-27

WSL2でDockerを勉強している時に、躓いたとこ

はじめに

Dockerを勉強しようと思い、Windows 10 Homeで環境を作る方法を探していると、WSL2を利用する方法が見つかったので試してみた。

Build Versionが18917以上にならない件

Windows Insider Programに入って、Windows Updateをしても、直ぐにはWSL2をインストールできなかった。
徐々にアップデートコンテンツが配布されていくらしく、自分の場合、Build Versionが18917以降になるのに数回のUpdateが必要で、数日かかった。

WSLコマンドについて

Windows Power Shellまたはコマンドプロンプトでwslコマンドを使うと、コマンドを実行したディレクトリの場所を引き継いで、登録しているUbuntu VM内に入ることができる。

> wsl
$ # wslコマンドを実行したディレクトリ情報を引き継いでVM内に入れる

Docker-composeコマンド使えない件

これはWSLとは関係なく、Dockerの勉強で躓いた点だが、dockerを起動していなかったため、docker-composeコマンドが使えなかった。(当たり前だが気づかなかった…)
以下のコマンドでdockerを起動するとできた。

> sudo service docker start
1
2
0

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
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?