Thiago R.
Explore posts from serversLocal machine refuses to connect to an ASP.NET Core Web API container
Hello
I need to find out how to access my Docker container via the host machine. My connection is refused, no matter the tool I use (browser,
curl
, wget
, javascript's fetch
). I've been looking for a solution since yesterday, but no success at all.
I've been trying to instantiate two containers within a same docker network, which is basically an ASP.NET Core Web API and a PostgreSQL server.
I have 0 Docker knowledge at all. I was using Rider's feature for instantiating containers and it worked properly. However, I decided to use a docker-compose.yml
file instead, because I was editing the same environment variables in both containers (such as PostgreSQL credentials and a default user seed data). I've deleted the IDE configuration before I actually start to build the docker-compose.yml
file as follows:
Both containers run properly, I just can't connect to the api container externally.15 replies