Posts

Showing posts with the label containers

Setting up docker with Hyper-V

Image
Docker is just amazing with flexibility we get to not worry about setting up the environments for our application.


--Photo by Ilse Orsel on Unsplash

Download docker for windows.

So with Windows we can use hyper-V and get containers spawned in minutes.

Here is how we do it.

Make sure you have Hyper-V enabled on windows if not go to turn on windows feature and turn this feature On. Once this is done with restart.

Use Hyper-V Manager for Windows to create a Virtual Switch



Now use the following commands to create the docker containers

docker-machine create -d hyperv --hyperv-virtual-switch "Primary Virtual Switch" default
this will create a VM, you can see this with Hyper-V manager or

docker-machine ls
once the machine is created you need to set some of the machine details in Environments Variables

to list the variables use

docker-machine env default
Now set the env vairables as below using bash

eval $("C:\Users\arjun_shetty\bin\docker-machine.exe" env default --shell …