Skip to content
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

zlib breaking change #42383

Merged
merged 2 commits into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/core/compatibility/9.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ If you're migrating an app to .NET 9, the breaking changes listed here might aff
| [DefaultKeyResolution.ShouldGenerateNewKey has altered meaning](aspnet-core/9.0/key-resolution.md) | Behavioral change | Preview 3 |
| [HostBuilder enables ValidateOnBuild/ValidateScopes in development environment](aspnet-core/9.0/hostbuilder-validation.md) | Behavioral change | Preview 7 |

## Containers

| Title | Type of change | Introduced version |
|-----------------------------------------------------------------------------|-------------------|--------------------|
| [.NET 9 container images no longer install zlib](containers/9.0/no-zlib.md) | Behavioral change | Preview 7 |

## Core .NET libraries

| Title | Type of change | Introduced version |
Expand Down
38 changes: 38 additions & 0 deletions docs/core/compatibility/containers/9.0/no-zlib.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
title: ".NET 9 container images no longer install `zlib`"
description: Learn about the breaking change in containers where .NET 9 container images no longer install the zlib package.
ms.date: 08/29/2024
---
# .NET 9 container images no longer install zlib

.NET 9 container images no longer install `zlib` since it's not a dependency of the .NET Runtime anymore.

## Previous behavior

In previous .NET versions, .NET container images installed the latest version of the `zlib` package from the Linux base image package repositories.

## New behavior

Starting in .NET 9, container images no longer install `zlib`. In addition, `zlib` is no longer updated in images where it's already installed from the base image.

## Version introduced

.NET 9 Preview 7

## Type of change

This change is a [behavioral change](../../categories.md#behavioral-change).

## Reason for change

In .NET 9, the Runtime contains a statically linked version of `zlib-ng`. As a result, the .NET Runtime no longer has a package dependency on `zlib`. To reduce .NET container image sizes, .NET 9 container images no longer install `zlib`, and no longer update `zlib` in images where it's already installed from the base Linux image.

## Recommended action

For most scenarios, no action is required. If your containerized .NET app has a direct package dependency on `zlib`, you should manually install it in your Dockerfile using the package manager.

## Affected APIs

None.

## See also
18 changes: 13 additions & 5 deletions docs/core/compatibility/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ items:
href: aspnet-core/9.0/key-resolution.md
- name: HostBuilder enables ValidateOnBuild/ValidateScopes in development environment
href: aspnet-core/9.0/hostbuilder-validation.md
- name: Containers
items:
- name: .NET 9 container images no longer install zlib
href: containers/9.0/no-zlib.md
- name: Core .NET libraries
items:
- name: Adding a ZipArchiveEntry sets header general-purpose bit flags
Expand Down Expand Up @@ -1184,12 +1188,10 @@ items:
href: configuration/7.0/diagnostics-config-section.md
- name: Containers
items:
- name: .NET 6
- name: .NET 9
items:
- name: Default console logger formatting in container images
href: containers/6.0/console-formatter-default.md
- name: Other breaking changes
href: https://github.com/dotnet/dotnet-docker/discussions/3699
- name: .NET 9 container images no longer install zlib
href: containers/9.0/no-zlib.md
- name: .NET 8
items:
- name: "'ca-certificates' removed from Alpine images"
Expand All @@ -1206,6 +1208,12 @@ items:
href: containers/8.0/multi-platform-tags.md
- name: New 'app' user in Linux images
href: containers/8.0/app-user.md
- name: .NET 6
items:
- name: Default console logger formatting in container images
href: containers/6.0/console-formatter-default.md
- name: Other breaking changes
href: https://github.com/dotnet/dotnet-docker/discussions/3699
- name: Core .NET libraries
items:
- name: .NET 9
Expand Down
Loading