docker / machine

Machine management for a container-centric world
https://docs.docker.com/machine/
Apache License 2.0
6.63k stars 1.97k forks source link

[Basic] Not able to configure docker-machine shell to swarm manager #4295

Open manojmathewcm opened 7 years ago

manojmathewcm commented 7 years ago

Basic beginner issue. I’m just starting with Dockers and I’m trying out the steps under Get Started section in the docs.

I’m using an Ubuntu machine. It is behind a proxy. Docker version: 17.09.0-ce Docker machine version: 0.13.0

I’m trying “Configure a docker-machine shell to the swarm manager” as in the link - https://docs.docker.com/get-started/part4/#configure-a-docker-machine-shell-to-the-swarm-manager

After setting the environment variables using - eval $(docker-machine env myvm1)

sudo docker-machine env myvm1 export DOCKER_TLS_VERIFY="1" export DOCKER_HOST=“tcp://192.168.99.100:2376" export DOCKER_CERT_PATH=”/home/*****/.docker/machine/machines/myvm1" export DOCKER_MACHINE_NAME=“myvm1” # Run this command to configure your shell: # eval $(docker-machine env myvm1)

eval $(sudo docker-machine env myvm1)

env | grep DOCKER DOCKER_HOST=tcp://192.168.99.100:2376 DOCKER_MACHINE_NAME=myvm1 DOCKER_TLS_VERIFY=1 DOCKER_CERT_PATH=/home/*****/.docker/machine/machines/myvm1

I still done see that myvm1 is active.

sudo docker-machine ls NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS myvm1 - virtualbox Running tcp://192.168.99.100:2376 v17.09.0-ce myvm2 - virtualbox Running tcp://192.168.99.101:2376 v17.09.0-ce

I have set proxy values in the below files: /etc/systemd/system/docker.service.d/http-proxy.conf and /etc/systemd/system/docker.service.d/https-proxy.conf

Is there any more configurations needed ? What can I check to find why this doesn’t work ?

tonygrimy86 commented 6 years ago

Same problem. When I write docker node ls i had : error during connect: Get https://192.168.99.100:2376/v1.35/nodes: Forbidden