Comments (10)
Yeah, these images are far too large.
from dotnet-framework-docker.
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.
@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.
@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.
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.
@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.
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.
@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.
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.
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)
- Can no longer add Microsoft.VisualStudio.Component.SQL.SSDTBuildSku component to image HOT 4
- DOTNET_RUNNING_IN_CONTAINER not set in LTSC2019 windows docker images HOT 1
- Docker builds failed for framework/aspnet:4.8-windowsservercore-ltsc2022 HOT 1
- Revert disabling of prebuild validation
- Automate the collection of release data and update the appropriate files HOT 2
- Investigate how to migrate off of Windows Server 2016 build agents HOT 1
- "Related repositories" links broken in MAR
- msbuild suceeded for net48 and net462 solutions but no dll files generated HOT 5
- Running simple visual basic script for unzipping a zip file throws Unspecified Error HOT 1
- New-IISSiteBinding command not present in latest mcr.microsoft.com/dotnet/framework/wcf:4.8 HOT 7
- Example of logging support
- aspnet:4.8-windowsservercore-ltsc2022 won't start with port binding HOT 1
- Latest .NET 4.7.2 Images run into a tls error trying to install nuget HOT 7
- `RuntimeSdkImageTests.VerifyImagesWithWebApps` test is failing in PR validation on `sdk:4.8-windowsservercore-ltsc2016` image
- dotnet-framework-sdk claims that Visual Studio Build Tools are included – Yet, they are not HOT 3
- Image with tag 4.8-windowsservercore-ltsc2022 generate 403 error by default HOT 3
- Fault bucket , type 0 Event Name: APPCRASH HOT 7
- Code coverage tool doesn't seem to work HOT 3
- Improve targeting pack acquisition
- Add support for Server 2025
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dotnet-framework-docker.