How to run Windows Nano Server container from Windows 10 Pro? - windows

My host is running Windows 10 Pro, version 2004, build 19041.1052. I have the Hyper-V and Containers Windows Features enabled. I am running Docker Desktop 4.0.0 (67817), Engine 20.10.8. I have chosen the engine for Windows Containers. I have pulled the Nano Server image tagged 2004-amd64 (build 19041.1165). I have a Ryzen 9 CPU. When I try to run the image with this command from a PowerShell run as Administrator:
docker run -it mcr.microsoft.com/windows/nanoserver:2004-amd64 --rm cmd.exe
I get this error:
C:\PROGRAM FILES\DOCKER\docker.exe: Error response from daemon: container
52d69ec5645099a0c729a285c1192f4cb909f167d36efa4cf60cf9cc82c6cd56 encountered an error
during hcsshim::System::CreateProcess: failure in a Windows system call: The system cannot
find the file specified. (0x2).
Searching this error yields a few questions from people having trouble building an image. None that I have seen have an accepted answer, and none of the suggestions seem relevant to me (most are focused on editing the Dockerfile).
I'm not married to this image tag. I would like to run some version of Nano Server or Server Core. Is it possible? How can I do it?

Today, after pulling and running mcr.microsoft.com/dotnet/framework/sdk:latest and mcr.microsoft.com/windows/servercore:2004-amd64 (both of which worked), I am now able to run the image mcr.microsoft.com/windows/nanoserver:2004-amd64 that was giving me trouble yesterday. I don't know what fixed it. Maybe some image layer was missing that got filled in by pulling another image using the same layer?

Related

Docker failed to initialize Docker-Desktop 4.16.1

OS Windows 11 21H2 OS Build 2000.1455
Docker 4.16.1
I have created a MSI file which executes a PowerShell script by using a bat file. PowerShell script enables wsl and Virtual Machine features. Download and installs Linux kernel update package and docker-desktop. After system reboot, we invoke docker desktop by using
& C:\Program Files\Docker\Docker\Docker Desktop.exe
Docker desktop starts and PowerShell script executes docker compose up -d command to configure a web application. it works fine on my
system with OS Windows 11 21H2 OS Build 2000.1455.
But on client’s system with OS Windows 11 21H2 OS Build 2000.1455, See image attached.
Docker desktop starts and then it shows “Docker Failed to Initialize” message with description
“Could not load file or assembly ‘Nlog version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c’ or one of its dependencies. The system can not find the file specified.”
I searched and i am unable to find this error in context of docker(it is available for c#). Can somebody help me to replicate this issue or provide me a solution for the same?
Please let me know if you have any questions?
Thanks!
I searched for the solution at github
https://github.com/docker/for-win/issues
I also searched and added question at
https://forums.docker.com/t/docker-failed-to-initialize-docker-desktop-4-16-1/134167
I am not able to replicate this on my machine and one another machine with fresh windows install. This issue is occurring at client's machine with same configuration.

What is the recommended way to develop docker containers for Linux on Windows?

Background
I am developing a Spring Boot application that will be deployed on Linux Redhat.
As this is a Java application, I can develop on Windows 10 and this is my preference.
To simplify deployment, I have dockerized the application.
Objectives
I would like to test the container on my Windows 10 development computer:
Without installing a VM
Without using Hyper V as a VM.
Without WSL 2.0 (WSL 1.0 can be used)
I need to create a volume so that data written by the container can be accessed on the Windows host during and after the container runs.
The scripts I write to load and run the docker should be as similar as possible as those I will use to deploy on the target Linux Redhat server.
What I have tried
I have installed Docker for Windows on my Windows PC and followed the documentation to allow me to run docker in WSL 1.0.
There are a number of tweaks that need to be done to make this work, and I am still not able to configure a volume to meet my requirement.
Curiously, I happened to try to run the container using docker on from a Windows command prompt and it seems to run too. (though volumes still do not work here either).
This surprised me because I thought that a Linux image can only be loaded into a Linux OS as docker does not run the container in a VM.
My questions
Can I indeed test my Linux container using the Windows prompt or may I run into issues down the road? (issues meaning differences in deployment and run time behavior compared to deployment and running on the Linux target machine).
If a Linux container can run from the Windows prompt, do I even need WSL to run the docker on my windows PC?
What are the advantages, if any, of using WSL to test and test the container in development considering the fact that docker on WSL 1.0 seems to require a little work to get running "flawlessly" on Windows?

How to 'make' OpenWhisk Docker Compose in Windows 10?

I am new to OpenWhisk.
I have windows 10, with Docker for windows installed. I followed the instructions given in the following URL to download the Docker compose from GIT, on my Windows 10 laptop.
This website mentions command 'make quick-start'. I learned from internet that 'make' is a Unix command. I want to understand how I can build this on windows?
As far as I know it doesn't work on Windows so far. See https://github.com/apache/incubator-openwhisk-devtools/issues/119 for more details.

Docker pull gives error unkown blob for microsoft/windowsservercore

I've mac OS as my host operating system and trying to pull an windows image microsoft/windowsservercore . While downloading it gives unknown blob error.
Docker version is 17.03.0-ce and shows OS/arch as linux/amd64. Would it be helpful if I change the OS/arch similar to the below:
https://i1.wp.com/blog.docker.com/wp-content/uploads/docker-for-windows-switch.gif?zoom=1.25&w=1140&ssl=1/
If so, could some one help me on how to switch to windows container from MAC
Thanks in Advance
To pull and run Docker Windows container images, you have to have a Windows machine available. On macOS, you'd have to run Windows 10 or Windows Server 2016 in a VM. Here are some resources for getting set up:
https://github.com/docker/labs/tree/master/windows/windows-containers
https://github.com/StefanScherer/docker-windows-box

Docker for Windows Server 2016 requires update KB3176936

I want to install Docker on a physical Windows Server 2016 Datacenter Evaluation (Version 14393). I tried following the instructions from Quick Start Windows Server but installation fails:
Error message
The docker installer requires update KB3176936, which I installed then. Even after rebooting, the error message persists and I can't install docker.
I've enabled the Container feature and Hyper-V in Windows Feature Selection.
Any ideas what I'm doing wrong? I've could sucessfully setup docker on Windows 10.
You need to do a full Windows Update. I actually have a PR to add this step to the docs.
Run sconfig, then choose option 6 and then A and A to install all updates. This works for Server 2016 in no-desktop installs as well as with the UI.

Resources