C#C
C#17mo ago
whgrs1692

Unable to connect to containerised postgres from webapi container ( on Ubuntu)

I have a docker compose ( webapi + postgres) that runs correctly.

However, when I try and run dotnet ef database update, it throws a Socket Error:
dotnet ef database update
Build started...
Build succeeded.
System.Net.Sockets.SocketException (00000001, 11): Resource temporarily unavailable
So, I docker exec into the webapi container ( which has a psql client) and I create a connection to the postgres container. The connection is established no problem. This proves the containers can communicate.

So what is going on when the dotnet ef command runs? Cant really post it on ef github cause they will just throw it out.

Where to next?
Was this page helpful?