Skip to content

Commit eebd9ef

Browse files
authored
Merge branch 'main' into docs-locale
2 parents ee17933 + f02517b commit eebd9ef

1 file changed

Lines changed: 43 additions & 93 deletions

File tree

documentation/image-artifact-details.md

Lines changed: 43 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This document is intended to be complimentary to the [Instructions for Finding L
44

55
> [!WARNING]
66
> Distroless images require special treatment since they don't contain a shell by default.
7-
> Please see [Distroless Images](#distroless-images) section below.
7+
> See the [distroless images section](#distroless-images-and-appliance-images) below.
88
99
## .NET and Other Components
1010

@@ -17,133 +17,83 @@ This document is intended to be complimentary to the [Instructions for Finding L
1717

1818
You can see these components installed in the [runtime](https://github.com/dotnet/dotnet-docker/blob/d90e7bd1d10c8781f0008f5ab1327ca3481e78de/src/runtime/8.0/bookworm-slim/amd64/Dockerfile#L6-L13), [aspnet](https://github.com/dotnet/dotnet-docker/blob/d90e7bd1d10c8781f0008f5ab1327ca3481e78de/src/aspnet/8.0/bookworm-slim/amd64/Dockerfile#L6-L12), and [sdk](https://github.com/dotnet/dotnet-docker/blob/d90e7bd1d10c8781f0008f5ab1327ca3481e78de/src/sdk/8.0/bookworm-slim/amd64/Dockerfile#L26-L48) Dockerfiles.
1919

20-
### .NET Runtime Image
20+
### .NET Runtime and ASP.NET Core Images
2121

22-
The [.NET runtime image](../README.runtime.md) includes the .NET runtime, with an associated license and third party notice file.
22+
The [runtime](../README.runtime.md) and [ASP.NET Core images](../README.aspnet.md) include a license and third party notice file.
2323

2424
```console
25-
$ docker run --rm mcr.microsoft.com/dotnet/runtime:9.0-bookworm-slim /bin/sh -c "find ./usr/share/dotnet | grep LICENSE"
25+
$ docker run --rm mcr.microsoft.com/dotnet/runtime:10.0 /bin/sh -c "find ./usr/share/dotnet | grep -i 'license\|third'"
2626
./usr/share/dotnet/LICENSE.txt
27-
```
28-
29-
The license can be printed out, as follows.
30-
31-
```console
32-
$ docker run --rm mcr.microsoft.com/dotnet/runtime:9.0-bookworm-slim cat ./usr/share/dotnet/LICENSE.txt
33-
The MIT License (MIT)
34-
35-
Copyright (c) .NET Foundation and Contributors
36-
37-
All rights reserved.
38-
39-
Permission is hereby granted, free of charge, to any person obtaining a copy
40-
of this software and associated documentation files (the "Software"), to deal
41-
in the Software without restriction, including without limitation the rights
42-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
43-
copies of the Software, and to permit persons to whom the Software is
44-
furnished to do so, subject to the following conditions:
45-
...
46-
```
47-
48-
Third party notices can also be found, as demonstrated below.
49-
50-
```console
51-
$ docker run --rm mcr.microsoft.com/dotnet/runtime:9.0-bookworm-slim /bin/sh -c "find ./usr/share/dotnet | grep -i third"
5227
./usr/share/dotnet/ThirdPartyNotices.txt
5328
```
5429

55-
### ASP.NET Core Image
56-
57-
The [ASP.NET Core image](../README.aspnet.md) includes ASP.NET Core in addition to .NET, with associated licenses and third party notice files.
58-
5930
```console
60-
$ docker run --rm mcr.microsoft.com/dotnet/aspnet:9.0-bookworm-slim /bin/sh -c "find ./usr/share/dotnet | grep LICENSE"
31+
$ docker run --rm mcr.microsoft.com/dotnet/aspnet:10.0 /bin/sh -c "find ./usr/share/dotnet | grep -i 'license\|third'"
6132
./usr/share/dotnet/LICENSE.txt
62-
63-
$ docker run --rm mcr.microsoft.com/dotnet/aspnet:9.0-bookworm-slim /bin/sh -c "find ./usr/share/dotnet | grep -i third"
6433
./usr/share/dotnet/ThirdPartyNotices.txt
65-
./usr/share/dotnet/shared/Microsoft.AspNetCore.App/9.0.0/THIRD-PARTY-NOTICES.txt
6634
```
6735

6836
### .NET SDK Image
6937

7038
The [SDK image](../README.sdk.md) includes the .NET SDK, which includes various .NET components, with associated licenses and third party notice files.
7139

7240
```console
73-
$ docker run --rm mcr.microsoft.com/dotnet/sdk:9.0-bookworm-slim /bin/sh -c "find ./usr/share/dotnet ./usr/share/powershell | grep LICENSE"
41+
$ docker run --rm mcr.microsoft.com/dotnet/sdk:10.0 /bin/sh -c "find ./usr/share/dotnet ./usr/share/powershell | grep -i 'license\|third'"
7442
./usr/share/dotnet/LICENSE.txt
75-
./usr/share/dotnet/sdk/9.0.101/Sdks/Microsoft.NET.Sdk.WindowsDesktop/LICENSE.TXT
76-
./usr/share/powershell/.store/powershell.linux.x64/7.5.0-preview.5/powershell.linux.x64/7.5.0-preview.5/tools/net9.0/any/Modules/Microsoft.PowerShell.PSResourceGet/LICENSE
77-
./usr/share/powershell/.store/powershell.linux.x64/7.5.0-preview.5/powershell.linux.x64/7.5.0-preview.5/tools/net9.0/any/LICENSE.txt
78-
79-
$ docker run --rm mcr.microsoft.com/dotnet/sdk:9.0-bookworm-slim /bin/sh -c "find ./usr/share/dotnet | grep -i third"
80-
./usr/share/dotnet/ThirdPartyNotices.txt
81-
./usr/share/dotnet/shared/Microsoft.AspNetCore.App/9.0.0/THIRD-PARTY-NOTICES.txt
82-
./usr/share/dotnet/sdk/9.0.101/Sdks/Microsoft.NET.Sdk.WindowsDesktop/THIRD-PARTY-NOTICES.TXT
83-
84-
$ docker run --rm mcr.microsoft.com/dotnet/sdk:9.0-bookworm-slim /bin/sh -c "find ./usr/share/dotnet ./usr/share/powershell | grep -i third"
8543
./usr/share/dotnet/ThirdPartyNotices.txt
86-
./usr/share/dotnet/shared/Microsoft.AspNetCore.App/9.0.0/THIRD-PARTY-NOTICES.txt
87-
./usr/share/dotnet/sdk/9.0.101/Sdks/Microsoft.NET.Sdk.WindowsDesktop/THIRD-PARTY-NOTICES.TXT
88-
./usr/share/powershell/.store/powershell.linux.x64/7.5.0-preview.5/powershell.linux.x64/7.5.0-preview.5/tools/net9.0/any/ThirdPartyNotices.txt
44+
./usr/share/dotnet/sdk/10.0.100/Sdks/Microsoft.SourceLink.Bitbucket.Git/LICENSE.txt
45+
./usr/share/dotnet/sdk/10.0.100/Sdks/Microsoft.SourceLink.AzureRepos.Git/LICENSE.txt
46+
./usr/share/dotnet/sdk/10.0.100/Sdks/Microsoft.Build.Tasks.Git/LICENSE.txt
47+
./usr/share/dotnet/sdk/10.0.100/Sdks/Microsoft.SourceLink.GitHub/LICENSE.txt
48+
./usr/share/dotnet/sdk/10.0.100/Sdks/Microsoft.NET.Sdk.WindowsDesktop/LICENSE.TXT
49+
./usr/share/dotnet/sdk/10.0.100/Sdks/Microsoft.NET.Sdk.WindowsDesktop/THIRD-PARTY-NOTICES.TXT
50+
./usr/share/dotnet/sdk/10.0.100/Sdks/Microsoft.SourceLink.Common/LICENSE.txt
51+
./usr/share/dotnet/sdk/10.0.100/Sdks/Microsoft.SourceLink.GitLab/LICENSE.txt
52+
./usr/share/powershell/.store/powershell.linux.x64/7.6.0-preview.4/powershell.linux.x64/7.6.0-preview.4/tools/net10.0/any/LICENSE.txt
53+
./usr/share/powershell/.store/powershell.linux.x64/7.6.0-preview.4/powershell.linux.x64/7.6.0-preview.4/tools/net10.0/any/Modules/Microsoft.PowerShell.PSResourceGet/LICENSE
54+
./usr/share/powershell/.store/powershell.linux.x64/7.6.0-preview.4/powershell.linux.x64/7.6.0-preview.4/tools/net10.0/any/Modules/Microsoft.PowerShell.ThreadJob/LICENSE
55+
./usr/share/powershell/.store/powershell.linux.x64/7.6.0-preview.4/powershell.linux.x64/7.6.0-preview.4/tools/net10.0/any/Modules/Microsoft.PowerShell.ThreadJob/ThirdPartyNotices.txt
56+
./usr/share/powershell/.store/powershell.linux.x64/7.6.0-preview.4/powershell.linux.x64/7.6.0-preview.4/tools/net10.0/any/Modules/PSReadLine/License.txt
57+
./usr/share/powershell/.store/powershell.linux.x64/7.6.0-preview.4/powershell.linux.x64/7.6.0-preview.4/tools/net10.0/any/ThirdPartyNotices.txt
8958
```
9059

91-
## Distroless Images
92-
93-
The commands listed above won't work when targeting a distroless image since distroless images don't contain a shell by default.
94-
Instead, you can copy the distroless image's filesystem into a another image that does contain a shell and inspect it from there.
60+
## Distroless Images and Appliance Images
9561

96-
This repo contains a [Dockerfile](./scripts/Dockerfile.distroless-wrapper) that takes a distroless container image as input.
97-
The dockerfile copies the distroless image's entire filesystem into a non-distroless base image so that its contents can be inspected with shell scripts.
62+
The commands listed above won't work when targeting a [distroless image](./distroless.md) since distroless images don't contain a shell by default.
63+
Instead, this repo contains a [Dockerfile](./scripts/Dockerfile.distroless-wrapper) that copies a distroless image's entire filesystem into a non-distroless base image so that its contents can be easily inspected using a shell.
9864

99-
First, build the Dockerfile, specifying the distroless image tag you wish to inspect:
65+
First, build the Dockerfile, specifying the distroless image tag you wish to inspect.
66+
Cloning the repo or downloading the Dockerfile is not necessary.
10067

10168
```console
102-
$image="mcr.microsoft.com/dotnet/aspnet:9.0-azurelinux3.0-distroless"
103-
docker build -t distroless-wrapper -f ./Dockerfile.distroless-wrapper --build-arg DISTROLESS_IMAGE=$image https://github.com/dotnet/dotnet-docker.git#main:documentation/scripts
69+
docker build -t distroless-wrapper -f ./Dockerfile.distroless-wrapper --build-arg DISTROLESS_IMAGE=mcr.microsoft.com/dotnet/runtime:10.0-noble-chiseled https://github.com/dotnet/dotnet-docker.git#main:documentation/scripts
10470
```
10571

106-
Now that you've got the wrapper image, you can execute the [commands that are documented](https://github.com/dotnet/dotnet-docker/blob/main/documentation/image-artifact-details.md).
107-
The only difference here is that you'll need to target the wrapper image instead.
108-
109-
For example, instead of executing this command as documented:
72+
Now that you've got the wrapper image, you can execute the [commands that are documented](https://github.com/dotnet/dotnet-docker/blob/main/documentation/image-artifact-details.md) targeting the wrapper image instead:
11073

11174
```console
112-
docker run --rm $image /bin/sh -c "find ./usr/share/dotnet | grep -i third"
113-
```
114-
115-
You would actually execute this command using the distroless wrapper image:
116-
117-
```console
118-
$ docker run --rm distroless-wrapper /bin/sh -c "find ./usr/share/dotnet | grep -i third"
75+
$ docker run --rm distroless-wrapper /bin/sh -c "find ./usr/share/dotnet | grep -i 'license\|third'"
76+
./usr/share/dotnet/LICENSE.txt
11977
./usr/share/dotnet/ThirdPartyNotices.txt
120-
./usr/share/dotnet/shared/Microsoft.AspNetCore.App/9.0.0/THIRD-PARTY-NOTICES.txt
12178
```
12279

123-
## Appliance Images
80+
### Appliance Images
12481

125-
### .NET Monitor
82+
.NET Monitor, Aspire Dashboard, and YARP images are all [distroless images](./distroless.md) and should be inspected the same way as other distroless .NET images.
12683

127-
The [.NET Monitor image](../README.monitor.md) includes .NET Monitor in addition to ASP.NET Core, with associated licenses and third party notice files. The .NET Monitor images are based on distroless ASP.NET Core images. As such, using the instructions from [Distroless Images](#distroless-images) is necessary to gather the license and notice file paths.
128-
129-
First, build the wrapper Dockerfile, specifying the image tag you wish to inspect:
84+
Each appliance image includes its own license and third party notices files.
85+
Appliance image binaries and metadata are located under the `/app` directory.
86+
Example using .NET Monitor:
13087

13188
```console
132-
docker build -t distroless-wrapper -f ./Dockerfile.distroless-wrapper --build-arg DISTROLESS_IMAGE=mcr.microsoft.com/dotnet/monitor:8 https://github.com/dotnet/dotnet-docker.git#main:documentation/scripts
133-
```
134-
135-
Finally, execute the following to get license and notice file paths:
89+
$ docker build -t distroless-wrapper -f ./Dockerfile.distroless-wrapper --build-arg DISTROLESS_IMAGE=mcr.microsoft.com/dotnet/monitor https://github.com/dotnet/dotnet-docker.git#main:documentation/scripts
90+
...
13691

137-
```console
138-
$ docker run --rm distroless-wrapper /bin/sh -c "find ./distroless/usr/share/dotnet ./distroless/app | grep LICENSE"
139-
./distroless/usr/share/dotnet/LICENSE.txt
140-
./distroless/app/LICENSE.TXT
141-
./distroless/app/extensions/AzureBlobStorage/LICENSE.TXT
142-
./distroless/app/extensions/S3Storage/LICENSE.TXT
143-
$ docker run --rm distroless-wrapper /bin/sh -c "find ./distroless/usr/share/dotnet ./distroless/app | grep -i third"
144-
./distroless/usr/share/dotnet/ThirdPartyNotices.txt
145-
./distroless/usr/share/dotnet/shared/Microsoft.AspNetCore.App/8.0.0/THIRD-PARTY-NOTICES.txt
146-
./distroless/app/THIRD-PARTY-NOTICES.TXT
147-
./distroless/app/extensions/AzureBlobStorage/THIRD-PARTY-NOTICES.TXT
148-
./distroless/app/extensions/S3Storage/THIRD-PARTY-NOTICES.TXT
92+
$ docker run --rm distroless-wrapper /bin/sh -c "find ./app | grep -i 'license\|third'"
93+
./app/extensions/S3Storage/LICENSE.TXT
94+
./app/extensions/S3Storage/THIRD-PARTY-NOTICES.TXT
95+
./app/extensions/AzureBlobStorage/LICENSE.TXT
96+
./app/extensions/AzureBlobStorage/THIRD-PARTY-NOTICES.TXT
97+
./app/LICENSE.TXT
98+
./app/THIRD-PARTY-NOTICES.TXT
14999
```

0 commit comments

Comments
 (0)