dotnet / sdk-container-builds

Libraries and build tooling to create container images from .NET projects using MSBuild
https://learn.microsoft.com/en-us/dotnet/core/docker/publish-as-container
MIT License
175 stars 30 forks source link

ContainerAppCommandInstruction when set to Entrypoint does not use the arguments defined in the ContainerAppCommandArgs tag. #548

Open lymberl opened 5 months ago

lymberl commented 5 months ago

When it builds a .NET8 Linux based image the following issue is occurring. To build the image the following command is used: dotnet publish --os linux --arch x64 -c Release /t:PublishContainer

In the documentation there is no example of how to use this. I have tried the below to run the echo "containersetupscript.sh" command. But instead it produces echo "dotnet dotnetApp.dll containersetupscript.sh" command. `

<ContainerAppCommandArgs Include="containersetupscript.sh" />
<ContainerAppCommandInstruction Include="Entrypoint" />

`

It doesn't work since it displays "dotnet dotnetApp.dll containersetupscript.sh" instead of just "containersetupscript.sh". How to get rid of "dotnet dotnetApp.dll" and just display "containersetupscript.sh"?

Expected behaviour of the echo command is to just display "containersetupscript.sh". But it inserts "dotnet dontetApp.dll" also as arguments to the command i want.