example-voting-app icon indicating copy to clipboard operation
example-voting-app copied to clipboard

Docker Swarm on Windows with Windows Containers

Open 3imediamaric opened this issue 5 years ago • 4 comments

Hi to all,

**Trying to use Docker Swarm on Windows with Windows Containers **

Steps to reproduce the issue, if relevant:

  1. docker swarm init --advertise-addr Local_IP

  2. Then we connect our worker PC with command which came from docker swarm init --advertise-addr

  3. git clone https://github.com/docker/example-voting-app

  4. cd example-voting-app

  5. docker stack deploy --compose-file=docker-stack-windows-1809.yml voting_stack image

  6. After that we get something like this: image

  7. If we watch one of Services with:

    docker service ps voting_stack_vote

    we get this view:

image 8. We would appreciate if someone can write to us what we can do to fix our Issue.

Describe the results you received: We are getting Error Messege "No such image: dockersamples/..""

Describe the results you expected: We expected normal installation of required Images and normal connection over localhost:5000 to deployed Site as it is described in dockersamples/example-voting-app GitHub Repository

3imediamaric avatar Jul 08 '19 12:07 3imediamaric

I can confirm that this image fails a pull on Docker Desktop 19.03.1 (Windows containers) with error:

docker pull dockersamples/examplevotingapp_vote:dotnet-nanoserver-1809
dotnet-nanoserver-1809: Pulling from dockersamples/examplevotingapp_vote
6a5e981230da: Verifying Checksum
651f3557e326: Download complete
7b3cd45bedfd: Download complete
4f05d8220871: Download complete
75cac45209c6: Download complete
9a20712a23c6: Download complete
0e05cb16f505: Download complete
3987801abb54: Download complete
filesystem layer verification failed for digest
sha256:6a5e981230da7b34a25588f20c8b6b5366256ab1e0aadc0b7ecb566855bf4679

BretFisher avatar Aug 26 '19 01:08 BretFisher

The other two windows images dockersamples/examplevotingapp_vote:dotnet-nanoserver and dockersamples/examplevotingapp_vote:dotnet-nanoserver-sac2016 pull successfully.

BretFisher avatar Aug 26 '19 01:08 BretFisher

Looks like the 1809 images must be rebuilt and pushed again to Docker Hub. These images are built in October 2018 based on the first release of the nanoserver images, but these base images were rolled back by MSFT. ping @sixeyed

StefanScherer avatar Aug 27 '19 06:08 StefanScherer

so...I am trying to get this app running on windows. I saw that dotnet was moved to a microsoft archive. I did the transformation as described in https://devblogs.microsoft.com/dotnet/net-core-2-1-container-images-will-be-deleted-from-docker-hub/ and got further but still get the following error: => => exporting layers 0.0s => => writing image sha256:e525ea4b0ec2eb36c645bef763bf002bfeaa457ba4f20c61019ca6b0ae876692 0.0s => => naming to docker.io/dockersamples/examplevotingapp_result:dotnet-nanoserver-1809 0.0s

[dockersamples/examplevotingapp_vote:dotnet-nanoserver-1809 builder 6/6] RUN dotnet publish -c Release -o /out Vote.csproj: #34 1.156 Microsoft (R) Build Engine version 16.7.2+b60ddb6f4 for .NET #34 1.156 Copyright (C) Microsoft Corporation. All rights reserved. #34 1.156 #34 1.960 Determining projects to restore... #34 1.987 /usr/share/dotnet/sdk/3.1.416/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.DefaultItems.targets(151,5): warning NETSDK1080: A PackageReference to Microsoft.AspNetCore.App is not necessary when targeting .NET Core 3.0 or higher. If Microsoft.NET.Sdk.Web is used, the shared framework will be referenced automatically. Otherwise, the PackageReference should be replaced with a FrameworkReference. [/Vote/Vote.csproj] #34 2.511 All projects are up-to-date for restore. #34 2.748 /usr/share/dotnet/sdk/3.1.416/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.DefaultItems.targets(151,5): warning NETSDK1080: A PackageReference to Microsoft.AspNetCore.App is not necessary when targeting .NET Core 3.0 or higher. If Microsoft.NET.Sdk.Web is used, the shared framework will be referenced automatically. Otherwise, the PackageReference should be replaced with a FrameworkReference. [/Vote/Vote.csproj] #34 4.934 Messaging/MessageHelper.cs(1,7): error CS0246: The type or namespace name 'Newtonsoft' could not be found (are you missing a using directive or an assembly reference?) [/Vote/Vote.csproj] #34 4.939 Startup.cs(30,56): warning CS0618: 'IHostingEnvironment' is obsolete: 'This type is obsolete and will be removed in a future version. The recommended alternative is Microsoft.AspNetCore.Hosting.IWebHostEnvironment.' [/Vote/Vote.csproj]


failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c dotnet publish -c Release -o /out Vote.csproj]: exit code: 1

the windows yml file seems to mention sac2016 version which was not available in the archives at microsoft. So I switched to 1809.

What should I do now?

michaeladamfons avatar Jan 31 '22 18:01 michaeladamfons

Hey @michaeladamfons, sorry you're having issues with the build. Due to the complexity of maintaining a dotnet Windows Container version, and lack of Windows Container maintainers in this repo, we're removing that demo from this example and sticking with dotnet for Linux Containers.

BretFisher avatar Dec 17 '22 03:12 BretFisher