Linux用のWindowsサブシステムにインストールした後、Dockerにアクセスできなくなります。

Linux用のWindowsサブシステムにインストールした後、Dockerにアクセスできなくなります。

Linux用のWindowsサブシステムを使用して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ではなくLinux用のWindowsサブシステムを使用しているため、Dockerを実行することはパッケージをインストールするだけの問題ではありません。 Dockerは、WindowsがエミュレートできないいくつかのLinux機能を使用します。一つあるウィンドウ用ドッカー、同じインターフェイスを持つ別のプログラムです。今回のサーバー障害の投稿どのように動作させるかを説明してください。しかし、実際のDockerが必要な場合は、高価なプラスチック模倣ではなく、実際のLinuxを実行する必要があります。 「現在完全に実行されているLinuxシステムにアクセスできません。」問題は、仮想マシンにLinuxをインストールすると数分で解決される可能性があります。

おすすめ記事