Open keigezellig opened 9 months ago
Hi @keigezellig - what you've found here is actually a bug in our validation code. None of the ways you're passing multiple tags are making it through to the containerization targets. I've got a PR to fix this validation at https://github.com/dotnet/sdk/pull/37832, but I'll have to dig for an example of correctly passing them through the command line. There's some other discussion here that may help: https://github.com/dotnet/sdk-container-builds/issues/492#issuecomment-1682804769
Describe the bug
I am using
dotnet publish
to create and publish a docker container for a Blazor WebApp. When setting the ContainerImageTag option through an environment variable which contains multiple tags (formatted according to the documentation), those tags are not put on the resulting docker image. This occurs when building locally as well using the .net SDK docker to build the app in my CI/CD environment.See screenshot below
To Reproduce
I created a minimal Blazor project (to be found here) that reproduces the issue in a couple of scenarios. Run the
deploy.sh
to see what happens. The actualdotnet publish
commands are also to found in this file.Further technical details
Output of
dotnet --info
(my local system).NET SDK: Version: 8.0.100 Commit: 57efcf1350 Workload version: 8.0.100-manifests.3b83835e
Runtime Environment: OS Name: ubuntu OS Version: 22.04 OS Platform: Linux RID: linux-x64 Base Path: /usr/share/dotnet/sdk/8.0.100/
.NET workloads installed: Workload version: 8.0.100-manifests.3b83835e [maui-android] Installation Source: SDK 8.0.100 Manifest Version: 8.0.3/8.0.100 Manifest Path: /usr/share/dotnet/sdk-manifests/8.0.100/microsoft.net.sdk.maui/8.0.3/WorkloadManifest.json Install Type: FileBased
[wasm-tools] Installation Source: SDK 8.0.100 Manifest Version: 8.0.0/8.0.100 Manifest Path: /usr/share/dotnet/sdk-manifests/8.0.100/microsoft.net.workload.mono.toolchain.current/8.0.0/WorkloadManifest.json Install Type: FileBased
Host: Version: 8.0.0 Architecture: x64 Commit: 5535e31a71
.NET SDKs installed: 8.0.100 [/usr/share/dotnet/sdk]
.NET runtimes installed: Microsoft.AspNetCore.App 8.0.0 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 8.0.0 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Other architectures found: None
Environment variables: DOTNET_ROOT [/usr/share/dotnet]
global.json file: Not found
Learn more: https://aka.ms/dotnet/info
Download .NET: https://aka.ms/dotnet/download