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

How to use configuration options with attributes from the command line #41829

Open
Herr-Sepp opened this issue Jul 18, 2024 · 0 comments
Open
Labels
dotnet-docker/subsvc dotnet-fundamentals/svc Pri1 High priority, do before Pri2 and Pri3 ⌚ Not Triaged Not triaged

Comments

@Herr-Sepp
Copy link

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

  • ID: 19c28091-b3ad-affb-6343-47d7fa066d55
  • Service: dotnet-fundamentals
  • Sub-service: dotnet-docker
@dotnet-bot dotnet-bot added the ⌚ Not Triaged Not triaged label Jul 18, 2024
@issues-automation issues-automation bot added dotnet-docker/subsvc dotnet-fundamentals/svc Pri1 High priority, do before Pri2 and Pri3 labels Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dotnet-docker/subsvc dotnet-fundamentals/svc Pri1 High priority, do before Pri2 and Pri3 ⌚ Not Triaged Not triaged
Projects
None yet
Development

No branches or pull requests

2 participants