philippgille / hello-netcoreapp

Basic .NET Core console application with additional scripts and files for building the app and creating release artifacts for a framework-dependent deployment, self-contained deployment, Docker image, Chocolatey package and AppImage
GNU General Public License v3.0
6 stars 5 forks source link

Add Dockerfile for image using SCD #4

Open philippgille opened 7 years ago

philippgille commented 7 years ago

You can probably just copy the current Dockerfile and just change the second (actual, non-builder) image a bit.

philippgille commented 7 years ago

Maybe the SCD works not only on microsoft/dotnet:1.1-runtime-deps, but on smaller images like Alpine as well? That would be an advantage for using the SCD in a Docker image.

See https://github.com/dotnet/core/blob/master/Documentation/prereqs.md for dependencies that are needed for running SCDs.

philippgille commented 7 years ago

Regarding Alpine, see dotnet/dotnet-docker#22

philippgille commented 6 years ago

Alpine seems to be a valid RID already, but not sure in which release or if fully supported or not: https://github.com/dotnet/corefx/blob/c6dbe361680efd21a20fdb8def01936b1031011c/pkg/Microsoft.NETCore.Platforms/runtime.json#L29

Also note: Even when an SCD in an Alpine image is small, the .NET Core runtime Alpine image is probably small as well. Check the difference to see if it's worth the effort.

philippgille commented 6 years ago

A .NET Core Alpine image is now available: https://www.hanselman.com/blog/TryingOutNewNETCoreAlpineDockerImages.aspx