Skip to navigation
How to access a docker server port from a docker client
05.04.17
example: debian docker container wants to access couchdb docker container 1. expose the port from the server like: docker run -it -d -p 5984:5984 --name couchdb couchdb 2. run the client with --net=host like: docker run -it -d --net=host --name debian debian test: 1. login to the debian container with docker exec -it debian bash 2. there install curl and request the server with: curl -X GET http://127.0.0.1:5984
https://docs.docker.com/engine/reference/run/
Reply
Anonymous
Information Epoch 1732641797
Choose portability over efficiency.
Home
Notebook
Contact us