When deploying docker container I have to start a server inside of it, and post some data from inside the container, using those bash commands (both inside the same Docker container):
screen -dmS screen-name java -jar app.jar
curl -X POST --data-binary "path/to/data" http://127.0.0.1:8082/url/path
When I test bash commands locally -- everything works as suggested. But inside the container I get this error:
#15 431.2 curl: (7) Failed to connect to 127.0.0.1 port 8082: Connection refused
I found the similar question, but there was no solution