Skip to main content
added 343 characters in body
Source Link
Alexey
  • 133
  • 1
  • 1
  • 10

I'm not sure if this is the right community to ask about my problem as I'm actually trying to launch docker within cygwin environment on windows. After Docker Toolbox install I'm trying to launch docker version in my cygwin shell and getting:

$ docker version
Could not read CA certificate "\\cygdrive\\c\\Users\\Alexey\\.docker\\machine\\machines\\default\\ca.pem": open \cygdrive\c\Users\Alexey\.docker\machine\machines\default\ca.pem: The system cannot find the path specified.

However, the actual file /cygdrive/c/Users/Alexey/.docker/machine/machines/default/ca.pem is there, the problem seems to be in wrong slashes (windows vs UNIX) in the path to the certificate file. But I can't figure out where to fix it.

Here are the env variables set in ~/.bash_profile:

export DOCKER_HOST=tcp://192.168.99.100:2376
export DOCKER_MACHINE_NAME=default
export DOCKER_TLS_VERIFY=1
export DOCKER_CERT_PATH=/cygdrive/c/Users/Alexey/.docker/machine/machines/default
export TERM=cygwin

UPDATE

Alexey@Alexey-PC ~
$ echo $DOCKER_CERT_PATH
/cygdrive/c/Users/Alexey/.docker/machine/machines/default/

Alexey@Alexey-PC ~
$ docker version
Could not read CA certificate "\\cygdrive\\c\\Users\\Alexey\\.docker\\machine\\machines\\default\\ca.pem": open \cygdrive\c\Users\Alexey\.docker\machine\machines\default\ca.pem: The system cannot find the path specified.

SOLUTION as proposed below by @cloverhap we need to set DOCKER_CERT_PATH environment variable, but it should contain windows path, not cygwin and moreover, the backslashes should be escaped, so the solution is to add this:

export DOCKER_CERT_PATH=C:\\Users\\%USERNAME%\\.docker\\machine\\machines\\default

to .bash_profile

I'm not sure if this is the right community to ask about my problem as I'm actually trying to launch docker within cygwin environment on windows. After Docker Toolbox install I'm trying to launch docker version in my cygwin shell and getting:

$ docker version
Could not read CA certificate "\\cygdrive\\c\\Users\\Alexey\\.docker\\machine\\machines\\default\\ca.pem": open \cygdrive\c\Users\Alexey\.docker\machine\machines\default\ca.pem: The system cannot find the path specified.

However, the actual file /cygdrive/c/Users/Alexey/.docker/machine/machines/default/ca.pem is there, the problem seems to be in wrong slashes (windows vs UNIX) in the path to the certificate file. But I can't figure out where to fix it.

Here are the env variables set in ~/.bash_profile:

export DOCKER_HOST=tcp://192.168.99.100:2376
export DOCKER_MACHINE_NAME=default
export DOCKER_TLS_VERIFY=1
export DOCKER_CERT_PATH=/cygdrive/c/Users/Alexey/.docker/machine/machines/default
export TERM=cygwin

UPDATE

Alexey@Alexey-PC ~
$ echo $DOCKER_CERT_PATH
/cygdrive/c/Users/Alexey/.docker/machine/machines/default/

Alexey@Alexey-PC ~
$ docker version
Could not read CA certificate "\\cygdrive\\c\\Users\\Alexey\\.docker\\machine\\machines\\default\\ca.pem": open \cygdrive\c\Users\Alexey\.docker\machine\machines\default\ca.pem: The system cannot find the path specified.

I'm not sure if this is the right community to ask about my problem as I'm actually trying to launch docker within cygwin environment on windows. After Docker Toolbox install I'm trying to launch docker version in my cygwin shell and getting:

$ docker version
Could not read CA certificate "\\cygdrive\\c\\Users\\Alexey\\.docker\\machine\\machines\\default\\ca.pem": open \cygdrive\c\Users\Alexey\.docker\machine\machines\default\ca.pem: The system cannot find the path specified.

However, the actual file /cygdrive/c/Users/Alexey/.docker/machine/machines/default/ca.pem is there, the problem seems to be in wrong slashes (windows vs UNIX) in the path to the certificate file. But I can't figure out where to fix it.

Here are the env variables set in ~/.bash_profile:

export DOCKER_HOST=tcp://192.168.99.100:2376
export DOCKER_MACHINE_NAME=default
export DOCKER_TLS_VERIFY=1
export DOCKER_CERT_PATH=/cygdrive/c/Users/Alexey/.docker/machine/machines/default
export TERM=cygwin

UPDATE

Alexey@Alexey-PC ~
$ echo $DOCKER_CERT_PATH
/cygdrive/c/Users/Alexey/.docker/machine/machines/default/

Alexey@Alexey-PC ~
$ docker version
Could not read CA certificate "\\cygdrive\\c\\Users\\Alexey\\.docker\\machine\\machines\\default\\ca.pem": open \cygdrive\c\Users\Alexey\.docker\machine\machines\default\ca.pem: The system cannot find the path specified.

SOLUTION as proposed below by @cloverhap we need to set DOCKER_CERT_PATH environment variable, but it should contain windows path, not cygwin and moreover, the backslashes should be escaped, so the solution is to add this:

export DOCKER_CERT_PATH=C:\\Users\\%USERNAME%\\.docker\\machine\\machines\\default

to .bash_profile

Notice removed Draw attention by Alexey
Bounty Ended with cloverhap's answer chosen by Alexey
added 413 characters in body
Source Link
Alexey
  • 133
  • 1
  • 1
  • 10

I'm not sure if this is the right community to ask about my problem as I'm actually trying to launch docker within cygwin environment on windows. After Docker Toolbox install I'm trying to launch docker version in my cygwin shell and getting:

$ docker version
Could not read CA certificate "\\cygdrive\\c\\Users\\Alexey\\.docker\\machine\\machines\\default\\ca.pem": open \cygdrive\c\Users\Alexey\.docker\machine\machines\default\ca.pem: The system cannot find the path specified.

However, the actual file /cygdrive/c/Users/Alexey/.docker/machine/machines/default/ca.pem is there, the problem seems to be in wrong slashes (windows vs UNIX) in the path to the certificate file. But I can't figure out where to fix it.

Here are the env variables set in ~/.bash_profile:

export DOCKER_HOST=tcp://192.168.99.100:2376
export DOCKER_MACHINE_NAME=default
export DOCKER_TLS_VERIFY=1
export DOCKER_CERT_PATH=/cygdrive/c/Users/Alexey/.docker/machine/machines/default
export TERM=cygwin

UPDATE

Alexey@Alexey-PC ~
$ echo $DOCKER_CERT_PATH
/cygdrive/c/Users/Alexey/.docker/machine/machines/default/

Alexey@Alexey-PC ~
$ docker version
Could not read CA certificate "\\cygdrive\\c\\Users\\Alexey\\.docker\\machine\\machines\\default\\ca.pem": open \cygdrive\c\Users\Alexey\.docker\machine\machines\default\ca.pem: The system cannot find the path specified.

I'm not sure if this is the right community to ask about my problem as I'm actually trying to launch docker within cygwin environment on windows. After Docker Toolbox install I'm trying to launch docker version in my cygwin shell and getting:

$ docker version
Could not read CA certificate "\\cygdrive\\c\\Users\\Alexey\\.docker\\machine\\machines\\default\\ca.pem": open \cygdrive\c\Users\Alexey\.docker\machine\machines\default\ca.pem: The system cannot find the path specified.

However, the actual file /cygdrive/c/Users/Alexey/.docker/machine/machines/default/ca.pem is there, the problem seems to be in wrong slashes (windows vs UNIX) in the path to the certificate file. But I can't figure out where to fix it.

Here are the env variables set in ~/.bash_profile:

export DOCKER_HOST=tcp://192.168.99.100:2376
export DOCKER_MACHINE_NAME=default
export DOCKER_TLS_VERIFY=1
export DOCKER_CERT_PATH=/cygdrive/c/Users/Alexey/.docker/machine/machines/default
export TERM=cygwin

I'm not sure if this is the right community to ask about my problem as I'm actually trying to launch docker within cygwin environment on windows. After Docker Toolbox install I'm trying to launch docker version in my cygwin shell and getting:

$ docker version
Could not read CA certificate "\\cygdrive\\c\\Users\\Alexey\\.docker\\machine\\machines\\default\\ca.pem": open \cygdrive\c\Users\Alexey\.docker\machine\machines\default\ca.pem: The system cannot find the path specified.

However, the actual file /cygdrive/c/Users/Alexey/.docker/machine/machines/default/ca.pem is there, the problem seems to be in wrong slashes (windows vs UNIX) in the path to the certificate file. But I can't figure out where to fix it.

Here are the env variables set in ~/.bash_profile:

export DOCKER_HOST=tcp://192.168.99.100:2376
export DOCKER_MACHINE_NAME=default
export DOCKER_TLS_VERIFY=1
export DOCKER_CERT_PATH=/cygdrive/c/Users/Alexey/.docker/machine/machines/default
export TERM=cygwin

UPDATE

Alexey@Alexey-PC ~
$ echo $DOCKER_CERT_PATH
/cygdrive/c/Users/Alexey/.docker/machine/machines/default/

Alexey@Alexey-PC ~
$ docker version
Could not read CA certificate "\\cygdrive\\c\\Users\\Alexey\\.docker\\machine\\machines\\default\\ca.pem": open \cygdrive\c\Users\Alexey\.docker\machine\machines\default\ca.pem: The system cannot find the path specified.
fixed the wrong path to the file
Source Link
Alexey
  • 133
  • 1
  • 1
  • 10

I'm not sure if this is the right community to ask about my problem as I'm actually trying to launch docker within cygwin environment on windows. After Docker Toolbox install I'm trying to launch docker version in my cygwin shell and getting:

$ docker version
Could not read CA certificate "\\cygdrive\\c\\Users\\Alexey\\.docker\\machine\\machines\\default\\ca.pem": open \cygdrive\c\Users\Alexey\.docker\machine\machines\default\ca.pem: The system cannot find the path specified.

However, the actual file /cygdrive/c/Users/Alexey/.docker/machine/machines/default/ca.pem is there, the problem seems to be in wrong slashes (windows vs UNIX) in the path to the certificate file. But I can't figure out where to fix it.

Here are the env variables set in ~/.bash_profile:

export DOCKER_HOST=tcp://192.168.99.100:2376
export DOCKER_MACHINE_NAME=default
export DOCKER_TLS_VERIFY=1
export DOCKER_CERT_PATH=/cygdrive/c/Users/Alexey/.docker/machine/machines/default
export TERM=cygwin

I'm not sure if this is the right community to ask about my problem as I'm actually trying to launch docker within cygwin environment on windows. After Docker Toolbox install I'm trying to launch docker version in my cygwin shell and getting:

$ docker version
Could not read CA certificate "\\cygdrive\\c\\Users\\Alexey\\.docker\\machine\\machines\\default\\ca.pem": open \cygdrive\c\Users\Alexey\.docker\machine\machines\default\ca.pem: The system cannot find the path specified.

However, the actual file /cygdrive/c/Users/Alexey/.docker/machines/default/ca.pem is there, the problem seems to be in wrong slashes (windows vs UNIX) in the path to the certificate file. But I can't figure out where to fix it.

Here are the env variables set in ~/.bash_profile:

export DOCKER_HOST=tcp://192.168.99.100:2376
export DOCKER_MACHINE_NAME=default
export DOCKER_TLS_VERIFY=1
export DOCKER_CERT_PATH=/cygdrive/c/Users/Alexey/.docker/machine/machines/default
export TERM=cygwin

I'm not sure if this is the right community to ask about my problem as I'm actually trying to launch docker within cygwin environment on windows. After Docker Toolbox install I'm trying to launch docker version in my cygwin shell and getting:

$ docker version
Could not read CA certificate "\\cygdrive\\c\\Users\\Alexey\\.docker\\machine\\machines\\default\\ca.pem": open \cygdrive\c\Users\Alexey\.docker\machine\machines\default\ca.pem: The system cannot find the path specified.

However, the actual file /cygdrive/c/Users/Alexey/.docker/machine/machines/default/ca.pem is there, the problem seems to be in wrong slashes (windows vs UNIX) in the path to the certificate file. But I can't figure out where to fix it.

Here are the env variables set in ~/.bash_profile:

export DOCKER_HOST=tcp://192.168.99.100:2376
export DOCKER_MACHINE_NAME=default
export DOCKER_TLS_VERIFY=1
export DOCKER_CERT_PATH=/cygdrive/c/Users/Alexey/.docker/machine/machines/default
export TERM=cygwin
Notice added Draw attention by Alexey
Bounty Started worth 50 reputation by Alexey
Source Link
Alexey
  • 133
  • 1
  • 1
  • 10
Loading