LoginSignup
41
19

More than 5 years have passed since last update.

Docker for Windowsをインストール後 could not read CA certificateエラーが出た時の解決方法

Last updated at Posted at 2018-05-03

問題

Docker for Windowsをインストール後、docker imagesを実行したところ、エラー発生


could not read CA certificate "C:\\Users\\...\\.docker\\machine\\machines\\default\\ca.pem": open C:\Users\...\.docker\machine\machines\default\ca.pem: The system cannot find the path specified.

原因

おそらく、Docker Toolboxを利用していたことのあるPCにDocker for WindowsをインストールしたことでDocker Toolboxの設定が残ってしまった。

発生経緯と手順

  • Windows 10 Home だったため、Docker Toolboxをインストールし利用していた
  • Windows 10 Pro にアップグレード
  • Docker Toolboxをアンインストール
  • Docker for Windowsをインストール
  • インストール後、確認のためdocker imagesを実行したところエラー発生

解決方法

以下をPowershellで実行

[Environment]::SetEnvironmentVariable("DOCKER_CERT_PATH", $null, "User")
[Environment]::SetEnvironmentVariable("DOCKER_HOST", $null, "User")
[Environment]::SetEnvironmentVariable("DOCKER_MACHINE_NAME", $null, "User")
[Environment]::SetEnvironmentVariable("DOCKER_TLS_VERIFY", $null, "User")
[Environment]::SetEnvironmentVariable("DOCKER_TOOLBOX_INSTALL_PATH", $null, "User")

解決するのに使用したissues(詳細はリンク先参照)

41
19
4

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
41
19