You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/usr/share/dotnet/sdk/8.0.403/Containers/build/Microsoft.NET.Build.Containers.targets(113,5): error CONTAINER2010:
Invalid ContainerImageTags provided: ${VERSION}.
ContainerImageTags must be a semicolon-delimited list of valid image tags. Image tags must be alphanumeric, underscore, hyphen, or period.
Using double quotes as described in the publish-as-container reference page (With latest as second parameter):
/usr/share/dotnet/sdk/8.0.403/Containers/build/Microsoft.NET.Build.Containers.targets(113,5): error CONTAINER2010:
Invalid ContainerImageTags provided: ${VERSION}.
ContainerImageTags must be a semicolon-delimited list of valid image tags. Image tags must be alphanumeric, underscore, hyphen, or period.
With a combined environment variable as suggested in some of the other issues:
/usr/share/dotnet/sdk/8.0.403/Containers/build/Microsoft.NET.Build.Containers.targets(113,5): error CONTAINER2010:
Invalid ContainerImageTags provided: ${VERSION}.
ContainerImageTags must be a semicolon-delimited list of valid image tags. Image tags must be alphanumeric, underscore, hyphen, or period.
With a combined environment variable as suggested in some of the other issues (With latest as second parameter):
/usr/share/dotnet/sdk/8.0.403/Containers/build/Microsoft.NET.Build.Containers.targets(113,5): error CONTAINER2010:
Invalid ContainerImageTags provided: ${VERSION}.
ContainerImageTags must be a semicolon-delimited list of valid image tags. Image tags must be alphanumeric, underscore, hyphen, or period.
I don't want to (and I can't since the version is taken from the Git tags using https://github.com/GitTools/GitVersion) put the tags directly to the project, but I want to always get two tags: Version (e.g. 1.14.2) and latest. Any ideas what else I can test?
The text was updated successfully, but these errors were encountered:
I have found https://learn.microsoft.com/en-us/dotnet/core/docker/publish-as-container?pivots=dotnet-8-0, #311 and #236, but still don't know how I can configure multiple container image tags while using a version environment variable.
Using: Net 8, latest version in Gitlab CI
What works:
$ dotnet publish -c Release --self-contained --no-restore --output publish/ -p ContainerImageTags="${VERSION}" /t:PublishContainer
What doesn't work:
latest
at the end:$ dotnet publish -c Release --self-contained --no-restore --output publish/ -p ContainerImageTags="${VERSION};latest" /t:PublishContainer
latest
at the front:$ dotnet publish -c Release --self-contained --no-restore --output publish/ -p ContainerImageTags="latest;${VERSION}" /t:PublishContainer
publish-as-container
reference page:$ dotnet publish -c Release --self-contained --no-restore --output publish/ -p ContainerImageTags='"latest;${VERSION}"' /t:PublishContainer
publish-as-container
reference page (With latest as second parameter):$ dotnet publish -c Release --self-contained --no-restore --output publish/ -p ContainerImageTags='"${VERSION};latest"' /t:PublishContainer
I don't want to (and I can't since the version is taken from the Git tags using https://github.com/GitTools/GitVersion) put the tags directly to the project, but I want to always get two tags: Version (e.g.
1.14.2
) andlatest
. Any ideas what else I can test?The text was updated successfully, but these errors were encountered: