Windows Subsystem for Linux にインストールした後、Docker にアクセスできない

Windows Subsystem for Linux にインストールした後、Docker にアクセスできない

Windows Subsystem for Linux を使用して Docker をインストールしました。

peter@BRIAN-PC:/mnt/c/Windows/System32$ docker version
The program 'docker' is currently not installed. You can install it by typing:
sudo apt-get install docker
peter@BRIAN-PC:/mnt/c/Windows/System32$ sudo apt-get install docker
[sudo] password for peter:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libfreetype6 os-prober
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed
  docker
0 to upgrade, 1 to newly install, 0 to remove and 50 not to upgrade.
Need to get 12.2 kB of archives.
After this operation, 65.5 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu/ trusty-updates/universe docker amd64 1.5-1 [12.2 kB]
Fetched 12.2 kB in 0s (48.5 kB/s)
Selecting previously unselected package docker.
(Reading database ... 25663 files and directories currently installed.)
Preparing to unpack .../docker_1.5-1_amd64.deb ...
Unpacking docker (1.5-1) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up docker (1.5-1) ...
peter@BRIAN-PC:/mnt/c/Windows/System32$ docker version
The program 'docker' is currently not installed. You can install it by typing:
sudo apt-get install docker

明らかに と入力しましたsudo apt-get install docker。これを動作させる方法を誰か教えてもらえますか? 純粋な Windows にインストールしようとしましたが、別のエラーが発生します。残念ながら、現在完全に動作する Linux マシンにアクセスできません。

答え1

パッケージはdockerUbuntu(Debianや他のディストリビューションと同様に)ではドッカーLinuxコンテナ展開ツールですが、ドッカー、GnomeとKDEのシステムトレイ。コンテナ管理ツールは今ではより有名ですが、システムトレイは以前から存在しており、今でもパッケージ名が残っています。コンテナ管理ツールは、というパッケージに含まれています。docker.io

次のようなツールを使用してパッケージを調べることで、これを確認できますapt

apt show docker               # or apt-cache show docker
apt search docker             # or apt-cache search docker
sudo apt install docker.io    # or sudo apt-get install docker.io

trusty (Ubuntu 14.04) では、コンテナ管理ツールの実行可能ファイルは元々 と呼ばれていましたがdocker.io、アップデートで に変更されdocker、システムトレイの実行可能ファイルは に名前が変更されましたwmdocker。システムの「コマンドが見つかりません」データベースは元の名前から構築されたため、そのキャッシュが古くなっているようです。キャッシュを再構築するには、 を実行しますupdate-command-not-found。最新のキャッシュがあれば、コマンドのシーケンスは一貫しています。つまり、元の Ubuntu 14.04 ではシステムトレイが正常にインストールされ、最近のリリースでは をインストールするように指示するメッセージが表示されますdocker.io


実際のLinuxではなくWindows Subsystem for Linuxを使用しているため、Dockerを実行するにはパッケージをインストールするだけでは不十分です。DockerはWindowsがエミュレートしないLinuxの機能に依存しています。Windows 用 Docker、これは同じインターフェースを持つ別のプログラムです。このサーバー障害の投稿実行方法を説明しています。ただし、本物の Docker が必要な場合は、高価な模造品ではなく、本物の Linux を実行する必要があります。「現在、完全に動作する Linux マシンにアクセスできない」という問題は、仮想マシンに Linux をインストールすることで数分で解決できます。

関連情報