appveyor / ci

AppVeyor community support repository
https://www.appveyor.com
344 stars 66 forks source link

Docker build for new 1809 images / OS build 10.0.17763.1 #2676

Open StefanScherer opened 6 years ago

StefanScherer commented 6 years ago

Any plans when you will support a Docker build with Windows Server 2019 which has been released this week?

The image names have changed for the Windows base images:

old:

new:

And it is still the same issue that we need to have an agent with the same kernel version 10.0.17763.1 to run Docker builds for these new images.

FeodorFitsner commented 6 years ago

Hi Stefan,

We've already started working on Windows Server 2019 image! :)

Is there WSL and LCOW available on WS 2019? If yes, could you share some info/links to read more?

Thank you!

StefanScherer commented 6 years ago

WSL is available in WS 2019.

Install-WindowsFeature Microsoft-Windows-Subsystem-Linux

See also https://docs.microsoft.com/en-us/windows/wsl/install-on-server But I haven't installed a Linux distro yet, too many other things to try ;-)

LCOW seems to work when you use the latest Docker EE 18.03 available and install the LinuxKit kernel This code snippet might help https://github.com/StefanScherer/windows-docker-machine/blob/59b8dd940e560a5fbe2a101c5cde3fbaae65269f/scripts/create-machine.ps1#L35-L48 I have tried it with some Insider builds a few weeks ago.

Install-Package -Name docker -ProviderName DockerMsftProvider -RequiredVersion 18-03-1-ee-3
FeodorFitsner commented 6 years ago

Fantastic! Love playing with new OSes! :)

This is the key to installing LCOW: https://github.com/StefanScherer/windows-docker-machine/blob/59b8dd940e560a5fbe2a101c5cde3fbaae65269f/scripts/create-machine.ps1#L46

I've been trying to follow LinuxKit instructions but didn't notice they mention somewhere how to get kernel file. 😄

StefanScherer commented 6 years ago

Yes, the default has changed in moby/moby aka Docker engine. https://github.com/linuxkit/lcow/commit/5441411ad41bbc51eb2de7a1b498d885975864cc But there is no newer lcow release yet so I had to move the file manually.

FeodorFitsner commented 6 years ago

Interesting, rename of bootx64.efi to kernel wasn't required on WS 2019 with Docker 18.03.1-ee-3.

Also, correct installation command for docker was:

Install-Package -Name docker -ProviderName DockerMsftProvider -RequiredVersion 18.03.1-ee-3

Both WSL and LCOW work like a charm on Windows Server 2019 in Azure! 👍

FeodorFitsner commented 6 years ago

Actually, looks like Azure still has "Preview" image for Windows Server 2019 :( as I'm getting this while trying to run new nano container:

PS C:\Users\appveyor> docker run mcr.microsoft.com/windows/nanoserver:1809
Unable to find image 'mcr.microsoft.com/windows/nanoserver:1809' locally
1809: Pulling from windows/nanoserver
C:\Program Files\Docker\docker.exe: a Windows version 10.0.17763-based image is incompatible with a 10.0.17666 host.
See 'C:\Program Files\Docker\docker.exe run --help'.
StefanScherer commented 6 years ago

The new VM images should show up in Azure next week. I have built a custom image in Azure for Chocolatey Fest.

The kernel was needed for the nightly Docker engine. Good to know that 18.03 EE does not have this latest change yet.

StefanScherer commented 6 years ago

The RequiredVersion can be shortened to 18.03 to get the latest if you like.

StefanScherer commented 5 years ago

In the meantime there is also Docker EE 18.09.0 which is already available in the Azure 2019 with Containers templates.

sixeyed commented 5 years ago

The Azure image is called Windows Server 2019 Datacenter with Containers - it has Docker installed and the latest Server Core and Nano base images already pulled.

darrenfurr commented 5 years ago

Server 2019 with Containers (Docker 18.09) & using LCOW on an Azure VM to an Azure ACR did not work for me. See this issue: https://github.com/docker/for-win/issues/2623

FeodorFitsner commented 5 years ago

@darrenfurr Thanks for sharing your experience! That's sad to know though. When I was playing with LCOW on Windows Server 2019 last time I didn't test push.

IanBFarrell commented 5 years ago

Has someone confirmed that the push worked with 18.03? because I have EOF errors with 18.09

FeodorFitsner commented 5 years ago

@IanBFarrell What AppVeyor image do you use?

IanBFarrell commented 5 years ago

Sorry, I am not using a AppVeyor image. This issue was linked from another issue on the Docker for-win issues and I followed it. If this issue is specific to AppVeyor images then I am sorry for bothering you.

Issue that brought me here: docker/for-win#2623

StefanScherer commented 5 years ago

Is there an ETA to have Windows Server 2019 build agents?

IlyaFinkelshteyn commented 5 years ago

We already have image Windows Server 2019 running on Azure and provide access to it per request. However we installed Docker Engine Enterprise like described here + LCOW. People who tried it were not satisfied because it lucks a lot of features so we re-working it now with Docker Desktop or Docker for Windows (sorry if I am wrong with terminology) which works with MobyLinux VM. We plan to release it by the end of month.

IlyaFinkelshteyn commented 5 years ago

Windows Server 2019 image preview is available. It has both Docker CE to run Linux Docker instances, as well as WSL. Usage example is here. Please provide AppVeyor account names so we can enable this image for those who want to try.

StefanScherer commented 5 years ago

That are great news and the example looks very promising. My AppVeyor account is StefanScherer as I login from GitHub.

IlyaFinkelshteyn commented 5 years ago

@StefanScherer it should be enabled for you now. Please set image to Windows Server 2019. How to set image, just in case :)

StefanScherer commented 5 years ago

Thanks @IlyaFinkelshteyn it works perfectly! Did my first manifest list build Traefik for 1803 and 1809 images without my hacky rebase-docker-image tool 🎉 https://github.com/StefanScherer/dockerfiles-windows/pull/403/files

IlyaFinkelshteyn commented 5 years ago

@StefanScherer a lot! Knowing it works for you, we feel more confident to advertise it for a wider public :) Hopefully longer than usual Starting stage (time to fire an Azure VM) is OK.

alangford commented 5 years ago

First of all Thank you so much for adding me this is great! This resolved our .net 2.2 docker image issue.

I am noticing a new issue with our build on the Windows Server 2019 it looks like the mongodb service cannot be found. will this be added in the future or should i look into installing it manually?

the error I am receiving is "Cannot find any service with service name 'MongoDB'"

IlyaFinkelshteyn commented 5 years ago

Welcome :) Yes we plan to add software to this image as needed. For now you can use this script to install it on the fly.

alangford commented 5 years ago

Welcome :) Yes we plan to add software to this image as needed. For now you can use this script to install it on the fly.

Thanks again!

iameli commented 5 years ago

Hey, this all sounds really great! Any way I could get AppVeyor account iameli on the Visual Studio 2019 list? Would really help us out bringing some Docker builds in sync.

IlyaFinkelshteyn commented 5 years ago

@iameli sure, enabled. But it is not Visual Studio 2019, it is Windows Server 2019. We are preparing Visual Studio 2019 as well, but we are no sure it will be on VMs with nested virtualization and Docker/WSL and all respective images installed. Windows Server 2019 is the image for all heterogeneous builds.

iameli commented 5 years ago

Got it - just looking to run Docker commands so that works perfectly fine. Thanks a lot!

IlyaFinkelshteyn commented 5 years ago

@alangford we deployed updated Windows Server 2019 image with MongoDB.

idubnori commented 5 years ago

@IlyaFinkelshteyn Could you add my account idubnori to be able to use Windows Server 2019 image? I'd like to use it to prepare the integration test env as Linux containers on my contributing oss...

IlyaFinkelshteyn commented 5 years ago

@idubnori added

idubnori commented 5 years ago

@IanBFarrell Thank you so much! worked for me.

ericxtang commented 5 years ago

Hi can we add the Windows Server 2019 image to the ericxtang appveyor account?

IlyaFinkelshteyn commented 5 years ago

@ericxtang done

olljanat commented 5 years ago

I'm just curious that when 2019 image should be public?

IlyaFinkelshteyn commented 5 years ago

@olljanat we are considering to merge it with Visual Studio 2019 image which is already public. Meanwhile we can enable it for you if need, just let us know your AppVeyor account.

khs1994 commented 5 years ago

@IlyaFinkelshteyn Can add the Windows Server 2019 image to the khs1994-docker appveyor account,thanks

IlyaFinkelshteyn commented 5 years ago

@khs1994 Sure, done.