machine
machine copied to clipboard
TLS verification failed on a new machine
Hi,
I was trying setup Docker Swarm according to this repo https://github.com/BretFisher/dogvscat, but when run basically any Docker command (eg. docker ps or docker stack deploy) I encouter an error:
The server probably has client authentication (--tlsverify) enabled. Please check your TLS client certification settings: Get "https://<ip>:2376/v1.40/containers/json": remote error: tls: bad certificate
I also tried solutions listed in this issue https://github.com/docker/toolbox/issues/255, but none of them worked for me. I even tried regenerate certificates, but with no success.
$ docker version
Client: Docker Engine - Community
Version: 19.03.13
API version: 1.40
Go version: go1.13.15
Git commit: 4484c46d9d
Built: Wed Sep 16 17:02:59 2020
OS/Arch: linux/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 19.03.13
API version: 1.40 (minimum version 1.12)
Go version: go1.13.15
Git commit: 4484c46d9d
Built: Wed Sep 16 17:01:30 2020
OS/Arch: linux/amd64
Experimental: true
containerd:
Version: 1.3.7
GitCommit: 8fba4e9a7d01810a393d5d25a3621dc101981175
runc:
Version: 1.0.0-rc10
GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dd
docker-init:
Version: 0.18.0
GitCommit: fec3683
$ docker-machine env <machine>
export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://<ip>:2376"
export DOCKER_CERT_PATH="/home/<username>/.docker/machine/machines/<machine>"
export DOCKER_MACHINE_NAME="<machine>"
# Run this command to configure your shell:
# eval $(docker-machine env <machine>)
Current workaround is
$ export DOCKER_HOST=ssh://<username>@<ip>
Any help will be much appreciated
Thanks