I have a Docker container for my web server running on 127.0.0.1:8009 and I also installed the Self Hosted Sentry app running on 127.0.0.1:9000. But now the web server cannot connect to the sentry service and send error messages. I also test with the docker container name and it doesn’t work.
Can someone help me manage it?
2
Answers
The solution is to add an extra host:
After that you can call everything running on localhost: with host.docker.internal:
You need to have Sentry and your web server in the same docker network for them to be able to communicate.
If you use docker-compose add something like this to you sentry compose file:
And something like this to your web server compose file: