Coder Social home page Coder Social logo

Comments (10)

atrauzzi avatar atrauzzi commented on August 17, 2024 4

Yeah, these images are far too large.

from dotnet-framework-docker.

MichaelSimons avatar MichaelSimons commented on August 17, 2024 4

I would suggest using Windows Server 2016 Version 1709 (Fall Creators Update) based images if possible. They are still too big but they are half the size.

REPOSITORY                    TAG                 IMAGE ID            CREATED             SIZE
microsoft/windowsservercore   1709                be1324f21832        3 weeks ago         5.58GB
microsoft/windowsservercore   ltsc2016            1fbef5019583        3 weeks ago         10.4GB

Full .NET Framework will not run on Nano Server which is why these images are based on Windows Server Core. .NET Core will run on Nano Server.

from dotnet-framework-docker.

masroorhasan avatar masroorhasan commented on August 17, 2024 1

@MichaelSimons apologies I thought a base image could be built off the 'scratch' image provided by docker, but I realized windows containers relies on the isolation process provided by windows server (i.e. the windows server core).

from dotnet-framework-docker.

richlander avatar richlander commented on August 17, 2024 1

@masroorhasan I understand the desire but microsoft/windowsservercore is a hard dependency of .NET Framework. There is nothing we can do to change that.

We will continue to seek ways of making our images smaller, but they will never be smaller than microsoft/windowsservercore images by virtue of this dependency.

from dotnet-framework-docker.

MichaelSimons avatar MichaelSimons commented on August 17, 2024 1

@masroorhasan

Just to clarify, the fall creators edition should be referenced like the following?
FROM microsoft/dotnet-framework:4.7.1-windowsservercore-1709

Yes that is correct.

Can you explain what your Docker host environment is? You need to be on a Fall Creators Update host in order to use the 1709 based images. There are compatibility limitations with 1709.

from dotnet-framework-docker.

masroorhasan avatar masroorhasan commented on August 17, 2024 1

@MichaelSimons Thanks for confirming - my host OS's are windows 10 and/or windows server 2016. I would need to upgrade to 1709 and fall creator's update on both moving forward.

from dotnet-framework-docker.

masroorhasan avatar masroorhasan commented on August 17, 2024

Thanks @MichaelSimons - that's a decent alternative.

I'm curious to know what the limitations are for dotnet-framework that it requires the full windowsservercore as a base image. Kind unrelated to this issue but to be honest even ~5GB is quite large in terms of docker image - correct me if I'm wrong but its almost as if a VM (base server OS) image is being converted to a docker image. Do you know if its feasible to build it off scratch?

Thanks again.

from dotnet-framework-docker.

MichaelSimons avatar MichaelSimons commented on August 17, 2024

@masroorhasan - Yes I agree 5 GB is still pretty big. It is not just a VM image. Can you explain what you mean by built off scratch? I'm not following.

from dotnet-framework-docker.

masroorhasan avatar masroorhasan commented on August 17, 2024

Thanks for the explanation @richlander - the dependency problem makes sense now. Just to clarify, the fall creators edition should be referenced like the following?

FROM microsoft/dotnet-framework:4.7.1-windowsservercore-1709

It would definitely be an improvement in cutting down the image size by half for sure.

from dotnet-framework-docker.

masroorhasan avatar masroorhasan commented on August 17, 2024

The reason I ask the above is because, using the above base image throws an error with any intermediary instructions between FROM and CMD on the Dockerfile. i.e.

FROM microsoft/dotnet-framework:4.7.1-windowsservercore-1709
RUN mkdir c:\bin
CMD [ "cmd" ]

Gives the following error:

C:\Users\MasroorH\Desktop\dotnet-docker> docker build -t dotnet-bsr-new .
Sending build context to Docker daemon  26.68MB
Step 1/10 : FROM microsoft/dotnet-framework:4.7.1-windowsservercore-1709
Step 2/10 : RUN mkdir   c:\bin
container 591b8664e71c9d4e54f00fdaa51a784844e6a61db73c2f0cbf5d35f1f911d89a encountered an error during CreateContainer: failure in a Windows system call: A connection could not be established with the Virtual Machine hosting the
Container. (0xc0370108) extra info: {"SystemType":"Container","Name":"591b8664e71c9d4e54f00fdaa51a784844e6a61db73c2f0cbf5d35f1f911d89a","Owner":"docker","IgnoreFlushesDuringBoot":true,"LayerFolderPath":"C:\\ProgramData\\Docker\\w
indowsfilter\\591b8664e71c9d4e54f00fdaa51a784844e6a61db73c2f0cbf5d35f1f911d89a","Layers":[{"ID":"3cf02adf-e79c-56c6-b846-160a313f0682","Path":"C:\\ProgramData\\Docker\\windowsfilter\\d7417fd1e35435faf80b144e57e34a13008a31b91bd30c
a85d2223328fac10fc"},{"ID":"02678abf-bdc3-53c2-8e4a-bf7c0c8e602e","Path":"C:\\ProgramData\\Docker\\windowsfilter\\76ac769a65a37c585517acc81f467288ee298465ccecb0be97de1d16e3b1c78e"},{"ID":"25e2369e-39f2-5c98-ab7d-3b6adf943344","Pa
th":"C:\\ProgramData\\Docker\\windowsfilter\\4a3e61f4d672c46cd9f7c7e92270fe36b0c06c033df5c53faba728d911c2808a"}],"HostName":"591b8664e71c","HvPartition":true,"EndpointList":["366e03a5-c872-4759-840e-eb21a2d5bb08"],"HvRuntime":{"I
magePath":"C:\\ProgramData\\Docker\\windowsfilter\\76ac769a65a37c585517acc81f467288ee298465ccecb0be97de1d16e3b1c78e\\UtilityVM"},"AllowUnqualifiedDNSQuery":true}

However, if the image has no intermediary instructions, then the build is fine. i.e.

FROM microsoft/dotnet-framework:4.7.1-windowsservercore-1709
CMD [ "cmd" ]

Is this base image only meant to be used for interactive running containers? Or maybe an issue with the underlying host being windows 10 (not a problem with regular windowsservercore-ltsc2016 though)?

Let me know if this can be tracked on this issue or whether I should open a separate issue for it.

Thanks again.

from dotnet-framework-docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.