docker-machine create node without tls verificatio

2019-01-13 19:01发布

When I create a node with docker-machine

docker-machine create -d virtualbox node1

it is created with tls verification enabled for docker deamon which made things a bit more of a hassle than normal for swarm.

I want to create a node with docker-machine without tls verification for testing purpose.

I tried with:

docker-machine create -d virtualbox --engine-tls false node1

and

docker-machine create -d virtualbox --engine-tls-verify false node1

and

docker-machine create -d virtualbox --engine-opt-tls false node1

3条回答
Anthone
2楼-- · 2019-01-13 19:43

I use commands below:

docker-machine create -d virtualbox --engine-env DOCKER_TLS=no node1

And then ssh to the node to execute docker commands:

docker-machine ssh node1
$ docker info
查看更多
戒情不戒烟
3楼-- · 2019-01-13 19:46

This worked best for me:

docker-machine create -d virtualbox --engine-env DOCKER_TLS=no --engine-opt host=tcp://0.0.0.0:2375 node1

This way it binds to 2375 in addition to 2376. 2375 is the tradition for non-tls daemons.

查看更多
戒情不戒烟
4楼-- · 2019-01-13 19:55

try:

docker-machine create -d virtualbox --engine-opt tlsverify=false node1

and after running:

eval "$(docker-machine env node1)"

run:

unset DOCKER_TLS_VERIFY
查看更多
登录 后发表回答