Docker for Windows: Difference between revisions

From Wildsong
Jump to navigationJump to search
Brian Wilson (talk | contribs)
Created page with "Refer to the book from Packt, ''Docker on Windows, Second Edition'' https://docs.docker.com/docker-for-windows/ Workflow anticipated * Develop on Windows 10 * Move contain..."
 
Brian Wilson (talk | contribs)
mNo edit summary
Line 11: Line 11:
== Windows 10 ==
== Windows 10 ==


Download and install  
Download and install Docker Desktop for Windows. (Be prepared; this requires a logout and a reboot!)
[https://hub.docker.com/?overlay=onboarding Docker Desktop for Windows]
 
Try [https://hub.docker.com/?overlay=onboarding Docker Desktop for Windows]
Tick the box "Use Windows containers instead of Linux containers (this can be changed after installation)".
Tick the box "Use Windows containers instead of Linux containers (this can be changed after installation)".


This installs Kitematic, which runs as a service (lower right corner look for the Docker whale)
In Kitematic, turn on experimental features under Settings->Daemon. This worksaround a glitch, which manifests on builds as
"no matching manifest for windows/amd64 10.0.18362 in the manifest list entries"
First things first in a bash shell I try
winpty docker run -it --rm hello-world
and it works, suggesting that I try this
winpty docker run -it mcr.microsoft.com/windows/servercore powershell
which failed with
C:/Program Files/Docker/Docker/Resources/bin/docker.exe: Error response from daemon: manifest
for mcr.microsoft.com/windows/servercore:latest not found: manifest unknown: manifest unknown.
See 'C:/Program Files/Docker/Docker/Resources/bin/docker.exe run --help'.
but adding the 1903 tag worked (after downloading the big bulky (about 2GB) servercore images (it's from Microsoft so it has to be big))
winpty docker run -it mcr.microsoft.com/windows/servercore:1903 powershell
=== Note on Linux containers ===
As I understand it if you run a Linux container on a Windows machine you will really be running a Linux virtual machine to host the Docker containers
As I understand it if you run a Linux container on a Windows machine you will really be running a Linux virtual machine to host the Docker containers
and that seems to imply it will be a heavier load on the server and probably also have strict resource limits (in particular, RAM will be capped by the
and that seems to imply it will be a heavier load on the server and probably also have strict resource limits (in particular, RAM will be capped by the

Revision as of 17:08, 8 October 2019

Refer to the book from Packt, Docker on Windows, Second Edition

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


Workflow anticipated

  • Develop on Windows 10
  • Move container to Windows Server 2019

Windows 10

Download and install Docker Desktop for Windows. (Be prepared; this requires a logout and a reboot!)

Try Docker Desktop for Windows Tick the box "Use Windows containers instead of Linux containers (this can be changed after installation)".

This installs Kitematic, which runs as a service (lower right corner look for the Docker whale)

In Kitematic, turn on experimental features under Settings->Daemon. This worksaround a glitch, which manifests on builds as "no matching manifest for windows/amd64 10.0.18362 in the manifest list entries"

First things first in a bash shell I try

winpty docker run -it --rm hello-world

and it works, suggesting that I try this

winpty docker run -it mcr.microsoft.com/windows/servercore powershell

which failed with

C:/Program Files/Docker/Docker/Resources/bin/docker.exe: Error response from daemon: manifest
for mcr.microsoft.com/windows/servercore:latest not found: manifest unknown: manifest unknown.
See 'C:/Program Files/Docker/Docker/Resources/bin/docker.exe run --help'.

but adding the 1903 tag worked (after downloading the big bulky (about 2GB) servercore images (it's from Microsoft so it has to be big))

winpty docker run -it mcr.microsoft.com/windows/servercore:1903 powershell

Note on Linux containers

As I understand it if you run a Linux container on a Windows machine you will really be running a Linux virtual machine to host the Docker containers and that seems to imply it will be a heavier load on the server and probably also have strict resource limits (in particular, RAM will be capped by the Linux VM). I am guessing it would have to install WSL (Windows System for Linux) or VirtualBox too.

Windows Server 2019

Not there yet... come back later today.