title: docker: entrypoint is not executing
body: <p>i have following dockerfile:</p>
  
  <pre><code># 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"]
  </code></pre>
  
  <p>and want that the entrypoint.sh is executing. But i get the error:</p>
  
  <pre><code>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&amp; 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
  </code></pre>
  
  <p>what does it mean: value for switch is missing and how can i get this to run? Thanks for help</p>
  
  <p><strong><em>UPDATE</em></strong></p>
  
  <p>please see here: <a href="https://stackoverflow.com/questions/51359885/docker-asp-net-core-container-starting-after-a-mysql-container">docker asp.net core container starting after a mysql container</a> for more information. Sorry for a similar second thread. please delete this thread</p>
  
  <p><strong><em>UPDATE 2</em></strong></p>
  
  <p>this is my entrypoint.sh:</p>
  
  <pre><code>#!/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
  &gt;&amp;2 echo "SQL Server is starting up"
  sleep 1
  done
  
  &gt;&amp;2 echo "SQL Server is up - executing command"
  exec $run_cmd
  </code></pre>
  
  <p>it seems that dotnet ef database update doesn´t work. so i get the error msg:</p>
  
  <pre><code>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&amp;clcid=0x409
  </code></pre>
  
  <p>is that not a error because the test.dll isn´t found?</p>