dotnet / dotnet/sdk-container-builds
Generate CMD when ContainerDefaultArgs is not set
- Dominant language
- No language data
- Stars
- 197
- Forks
- 53
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I am trying to build a container from a project which requires command line args for some actions, but not by default. I.e. running `myapp` is as valid as running `myapp arg1234`.
Currently there seems to be no way to properly containerize this through dotnet publish.
* If you do not set any `ContainerDefaultArgs`, no CMD entry is generated in the container, so `docker run mycontainer arg1234` does not pass on the `arg1234`, or
* If you do add `ContainerDefaultArgs` with some other value (as `Include` is mandatory), you can't run the program without any args (as that would result in the default args being used).
An option of course would be to change the program to requiring an argument for the default behaviour, but that seems like a workaround to me for a problem that should not exist in the first place.
Cheers.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.