7
10

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 for WindowsをWSLで使う一番楽な方法

Posted at

Docker for Windowsを使ってLinuxコンテナを触っていると、WSLからでもDockerが使えるようにしたいと思うものです。

ホスト側tcp接続を有効にしてWSL側にDocker CLIをインストールしてDOCKER_HOST環境変数を設定して…
とすれば普通に使えたりするわけですが、実はもっと楽な方法がありました。

bash
$ alias docker='/mnt/c/Program\ Files/Docker/Docker/resources/bin/docker.exe'

多分これが一番楽だと思いま(略

#冗談のつもりでしたが、案外この方法で用が足りるんじゃ…:sweat:

7
10
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
7
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?