0

I download the boot2docker@1.7.1 and install it through the package wizard. But when I try to run it, it throws me this error:

An error occurred trying to connect: Post https://192.168.59.103:2376/v1.19/containers/create: remote error: bad certificate

I tried with all this options, but the issue remains.

Community
  • 1
  • 1
mariowise
  • 2,167
  • 2
  • 21
  • 34
  • ```boot2docker ssh 'sudo /etc/init.d/docker restart'``` Did you try it? – Tuan Jul 21 '15 at 07:38
  • It throws me `Need TLS certs for boot2docker,127.0.0.1,10.0.2.15,192.168.59.105 -------------------` – mariowise Jul 21 '15 at 22:52
  • 2
    You need to run 3 ```export``` commands after that. The ```export``` command displays after we run ```boot2docker up```. – Tuan Jul 22 '15 at 02:23

1 Answers1

0

You could try running boot2docker shellinit to set up your certificates and print some commands to be executed before you run anything using the docker command.

On a Mac it would look similar to:

Writing /Users/xyz/.boot2docker/certs/boot2docker-vm/ca.pem
Writing /Users/xyz/.boot2docker/certs/boot2docker-vm/cert.pem
Writing /Users/xyz/.boot2docker/certs/boot2docker-vm/key.pem
    export DOCKER_HOST=tcp://192.168.59.103:2376
    export DOCKER_CERT_PATH=/Users/xyz/.boot2docker/certs/boot2docker-vm
    export DOCKER_TLS_VERIFY=1

Here you could simply run $(boot2docker shellinit) to set up everything properly.

On Windows you will have some SET commands to issue instead of those export commands. For further information for Windows users please refer to the boot2docker documentation.

Henrik Sachse
  • 51,228
  • 7
  • 46
  • 59