Docker for windows installation note

LAI TOCA
LAI TOCA
Nov 19, 2018 · 3 min read
Photo by frank mckenna on Unsplash

Container as service(s) just like hero that saving lots of cost (communicating, maintenance efforts..) between developer team and operator team. Docker became the main technology for building such things that making DevOps more easily. The topic of this article was to write down the step how to setup docker environment on windows.

## Pre-work

  1. Enable Hyper-V

Turn-on Virtualization feature on bios

Turn-on Windows features on windows OS

Make sure your OS must be Windows 10 64 bit: Pro, Enterprise or Education (1607 Anniversary Update, Build 14393 or later).

2. Registry and download the source package on: official web site

## Installation

Just following the installation wizard to complete the installation process

## That’s begun start to interactive with docker

1. Check the docker/docker-compose version via Cmd or PowerShell window

docker — version and docker-compose — version

2. Check the docker daemon(running state)

docker ps

3. Install management user interface(portainer.io) image on container and run the service up(In Linux container)

- Create volume to store the services’ data

docker volume create portainer_data

- Pulling the image from remote repository and running under background that mapping to local’s port 9000

docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer

4. If everything works find, we could create login account and entering the dashboard for management our local docker

## Trouble shooting

Sometime we are not in good luck XD, the Docker not working in properly after we installation:

### Docker daemon not found while execute relative command(s) like docker ps…

  • Make sure dock is running with green light
  • Check “Docker for Windows Service” from service panel is running, or Restart service to see anything were okay or not
  • Try below PowerShell command to see it might help or not(In administrator mode)
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -Alldism.exe /Online /Enable-Feature:Microsoft-Hyper-V /All

### VM “MobyLinuxVM” not start normally that caused docker not running

  • Check the Hyper-V Manager to make sure the VM were still running or not
  • If VM not created, tried to create used below command:
-ExecutionPolicy ByPass -File “C:\Program Files\Docker\Docker\resources\MobyLinux.ps1” -create
  • If you still got the problem, tried to update the docker version to latest version and turn off anti-virus or malicious software temporarily to see if we could get rid of it then after testing result were fine, then we could try to add(Vmms.exe or Vmwp.exe) whitelist or exception list and turn on the protect software.

## Reference

- https://portainer.io/install.html

- https://docs.docker.com/docker-for-windows/install/

- https://github.com/docker/for-win/issues/599

- https://github.com/docker/for-win/issues/794

- https://social.technet.microsoft.com/wiki/contents/articles/2179.hyper-v-anti-virus-exclusions-for-hyper-v-hosts.aspx

LAI TOCA

Written by

LAI TOCA

Coding for fun

More From Medium

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade