dotnet / dotnet-docker

Docker images for .NET and the .NET Tools.
https://hub.docker.com/_/microsoft-dotnet
MIT License
4.46k stars 1.94k forks source link

Adding `<suite>-slim` variant support #254

Closed MichaelSimons closed 7 years ago

MichaelSimons commented 7 years ago

@zafields commented on Tue Jun 20 2017

Can you also provide an image with debian:stretch-slim as the base image, instead of debian:stretch to minimize the image size for both ARM and x64?

You can find more information on the Debian Docker store page (https://store.docker.com/images/debian); specifically under the "<suite>-slim variants" heading.

"These tags are an experiment in providing a slimmer base (removing some extra files that are normally not necessary within containers, such as man pages and documentation), and are definitely subject to change."

This is very helpful in scenarios where multiple containers are in use in environments with limited resources (i.e. Raspberry Pi). Using jessie vs. jessie-slim as an example, you can see this removes 50MB from the base, which is roughly 1/3 of the overall storage required.


@richlander commented on Wed Jun 21 2017

We will definitely consider this. One hand, this looks like a "no brainer", but on the other, the experimental aspect is concerning. I can imagine going with -slim for ARM32 and non-slim for X64. I'd like to focus our efforts for X64 on Alpine and provide the standard image for X64 for folks that want Debian. We could provide both variants, but that's confusing.


@zafields commented on Wed Jun 21 2017

I think using a different base (for each architecture, ARM and x64) to effectively deliver "the same" development surface would be very confusing.

The greatest value of containers is their ability to provide the exact same experience, regardless of the platform. If you do elect to offer a -slim variant, then it should be available on both architectures.

However you choose to tackle this problem, please provide symmetry between the ARM and x64 architectures, the applications we build on top of these containers depend on it.

richlander commented 7 years ago

Given @zafields last reply, I suggest we not opt for -slim at this time. I do not feel compelled to adopt -slim for x64.

MichaelSimons commented 7 years ago

@richlander I agree - as you previously mentioned, we should be concentrating on Alpine for a lightweight alternative.

zafields commented 7 years ago

@richlander and @MichaelSimons that sounds like the right move. I will definitely be looking forward to your Alpine image. Also, I do have some experience making Alpine images and I would be happy to help prototype an image if it would be helpful.

Finally, to bring this full circle, does that mean we can expect a .NET 2.0 Docker image based on arm32v7/debian:stretch? If not, is there an appropriate place for me to log an issue, so this request can be correctly cataloged and prioritized?

MichaelSimons commented 7 years ago

@zafields - We are working on arm32v7 images for .NET Core 2.0. See #223.