Skip to content

Drop use of buildpack-deps as base image #1848

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Apr 20, 2020
Merged

Conversation

mthalman
Copy link
Member

  • Updates 5.0 SDK buster and focal images to be based on aspnet base image instead of buildpack-deps.
  • Adds ca-certificates, curl, git, and wget to 5.0 SDK images for alpine, buster, and focal.
  • Adds test to validate the contents of the SDK.
  • Adds tests to validate the derivation of the .NET version environment variables.

Fixes #1814
Fixes #1843

@mthalman mthalman requested a review from MichaelSimons April 16, 2020 20:00
@MichaelSimons
Copy link
Member

Can you provide a summary of the size impact to this change? What I am looking for is the base image size, final image size and the original image size. Having this for the debian and ubuntu amd64 images would be sufficient.

@mthalman
Copy link
Member Author

mthalman commented Apr 16, 2020

Image Size Summary (on disk)

Focal

aspnet Base Original (based on buildpack-deps) Final
233 MB 738 MB 630 MB

Buster

aspnet Base Original (based on buildpack-deps) Final
209 MB 734 MB 598 MB

@mthalman
Copy link
Member Author

I just realized that buster SDK is now based on buster-slim. I suppose we should change its tag to be buster-slim now?

@MichaelSimons
Copy link
Member

I just realized that buster SDK is now based on buster-slim. I suppose we should change its tag to be buster-slim now?

Yes, I think so.

@mthalman mthalman merged commit 39794bb into dotnet:nightly Apr 20, 2020
@mthalman mthalman deleted the issue1814 branch April 20, 2020 21:22
@mthalman mthalman mentioned this pull request Apr 22, 2020
39 tasks
mthalman added a commit to mthalman/dotnet-docker that referenced this pull request Apr 23, 2020
@mthalman
Copy link
Member Author

Here's a comparison of the benefits these changes provide in terms of the download cost savings. The canonical scenario here is a multi-stage Dockerfile that builds and publishes an ASP.NET app (see the sample ASP.NET Dockerfile). The scenario involves first pulling the SDK image in order to build the application and then pulling the ASP.NET image to contain the published application. Before these changes, there was no layer sharing between the ASP.NET image and the SDK image. This was wasteful because the SDK image does contain ASP.NET bits; it just wasn't based on the ASP.NET image. With the changes that were made here, the SDK is now based on the ASP.NET image which means that once you've pulled the SDK image, you now essentially have the ASP.NET image as well. This provides substantial download savings when both images need to be pulled.

Focal

Before After
1. Pull SDK image 268 MB 232 MB
2. Pull ASP.NET image 64 MB 10 KB (manifest only)

Net download savings: 100 MB (-30%)

Buster

Before After
1. Pull SDK image 280 MB 218 MB
2. Pull ASP.NET image 84 MB 4 KB (manifest only)

Net download savings: 146 MB (-40%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants