I've tried with both ENTRYPOINT and CMD to force my ASP.NET core application to wait for my postgres container to start up the database, but I'm still met with this exception when migration runs
pgsql.NpgsqlException (0x80004005): Exception while reading from stream
Here's what I tried:
CMD ["bash -c 'while !</dev/tcp/db/5432; do sleep 1; done; dotnet API.dll"]
ENTRYPOINT ["bash -c 'while !</dev/tcp/db/5432; do sleep 1; done;", "dotnet", "API.dll"]
What am I doing wrong?
User contributions licensed under CC BY-SA 3.0