How to make ‘Docker for windows’ use another VM besides MobylinuxVM?

0 votes
I setup Docker for windows and created a new VM but now I would like to change my Local Docker client to use this newly created machine instead of the MobylinuxVM.
Aug 16, 2018 in Docker by Tyrion anex
• 8,280 points
436 views

1 answer to this question.

0 votes

docker-machine env can output the environment for cmd or powershell. The output includes comments with the command to set the environment in your shell.

CMD

C:\> docker-machine env --shell cmd manager11
SET DOCKER_TLS_VERIFY=1
SET DOCKER_HOST=tcp://192.168.99.100:2376
SET DOCKER_CERT_PATH=C:/Users/matt/.docker/machine/machines/manager11
SET DOCKER_MACHINE_NAME=manager11
REM Run this command to configure your shell:
REM     @FOR /f "tokens=*" %i IN ('docker-machine env --shell cmd manager11') DO @%i

Powershell

PS C:\> docker-machine env --shell powershell manager11
$Env:DOCKER_TLS_VERIFY = "1"
$Env:DOCKER_HOST = "tcp://192.168.99.100:2376"
$Env:DOCKER_CERT_PATH = "C:/Users/matt/.docker/machine/machines/manager11"
$Env:DOCKER_MACHINE_NAME = "manager11"
# Run this command to configure your shell:
# & docker-machine env --shell powershell manager11 | Invoke-Expression
answered Aug 16, 2018 by Sophie may
• 9,870 points

Related Questions In Docker

0 votes
1 answer

How to install telnet in Docker for Windows 10?

If you are trying to telnet in ...READ MORE

answered Aug 27, 2018 in Docker by Tyrion anex
• 8,280 points
631 views
0 votes
1 answer

How to save a Dynamic port in Docker for Windows?

The mapped ports can be accessed via ...READ MORE

answered Sep 4, 2018 in Docker by Tyrion anex
• 8,280 points
48 views
0 votes
1 answer
0 votes
1 answer

How to enable/ disable Hyper-V for Docker on Windows?

You can do this from command prompt ...READ MORE

answered Sep 10, 2018 in Docker by Tyrion anex
• 8,280 points
590 views
0 votes
1 answer
0 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 56,920 points
221 views
+1 vote
1 answer