i have following dockerfile:
# Build runtime image
FROM microsoft/aspnetcore:2.0
WORKDIR /app
COPY ./entrypoint.sh ./app/
RUN chmod +x ./app/entrypoint.sh
CMD /bin/bash ./app/entrypoint.sh
ENTRYPOINT ["dotnet", "test.dll"]
and want that the entrypoint.sh is executing. But i get the error:
Unhandled Exception: System.FormatException: Value for switch '/bin/bash ./app/entrypoint.sh' is missing.
Test | at Microsoft.Extensions.Configuration.CommandLine.CommandLineConfigurationProvider.Load()
Test | at Microsoft.Extensions.Configuration.ConfigurationRoot..ctor(IList`1 providers)
Test | at Microsoft.Extensions.Configuration.ConfigurationBuilder.Build()
Test | at Microsoft.AspNetCore.Hosting.WebHostBuilder.BuildCommonServices(AggregateException& hostingStartupErrors)
Test | at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build()
Test | at Test.Program.Main(String[] args) in /app/Program.cs:line 19
Identity exited with code 139
what does it mean: value for switch is missing and how can i get this to run? Thanks for help
UPDATE
please see here: docker asp.net core container starting after a mysql container for more information. Sorry for a similar second thread. please delete this thread
UPDATE 2
this is my entrypoint.sh:
#!/bin/bash
set -e
echo -e "\nWaiting for the Database-Service..."
run_cmd="dotnet run --server.urls http://*:80"
until dotnet ef database update; do
>&2 echo "SQL Server is starting up"
sleep 1
done
>&2 echo "SQL Server is up - executing command"
exec $run_cmd
it seems that dotnet ef database update doesn´t work. so i get the error msg:
SQL Server is starting up
Test | Did you mean to run dotnet SDK commands? Please install dotnet SDK from:
Test | http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
is that not a error because the test.dll isn´t found?