How to use configuration options with attributes from the command line #41829
Labels
dotnet-docker/subsvc
dotnet-fundamentals/svc
Pri1
High priority, do before Pri2 and Pri3
⌚ Not Triaged
Not triaged
Type of issue
Missing information
Description
I would like to add environment variables to the image in my CI/CD environment.
(e.g. dev-image should get different ENV than Release)
You have documented it for tags:
dotnet publish -p ContainerImageTags='"1.2.3-alpha2;latest"'
Even if I don't know how it works because such a property “ContainerimageTags” is not documented for msbuild
https://learn.microsoft.com/en-us/visualstudio/containers/container-msbuild-properties?view=vs-2022
But it works.
Unfortunately, I don't know what the syntax is for configurations options with arguments.
For my usecase i want to set ContainerEnvironmentVariable which has the arguments include and value
Something like that
dotnet public -p ContainerEnvironmentVariable=ENV_NAME=ENV_VALUE
but this not work.
How can i set ContainerEnvironmentVariable as dotnet publish commandline option ?
Page URL
https://learn.microsoft.com/en-us/dotnet/core/docker/publish-as-container
Content source URL
https://github.com/dotnet/docs/blob/main/docs/core/docker/publish-as-container.md
Document Version Independent Id
401bc84b-9410-3583-91f6-88968654b588
Article author
@IEvangelist
Metadata
The text was updated successfully, but these errors were encountered: