I'm quite new in Docker word and I would like to pass arguments to my script from docker run. My C# code looks like:
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello: " + args[0]);
}
}
And my Docker file is the following:
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 as build
WORKDIR /app
COPY MediumDemo.csproj .
RUN dotnet restore MediumDemo.csproj
COPY . .
RUN dotnet publish -c Release -o out
FROM mcr.microsoft.com/dotnet/core/runtime:3.1 as runtime
WORKDIR /app
COPY --from=build /app/out ./
ENTRYPOINT ["dotnet", "Demo.dll"]