Skip to content

Instantly share code, notes, and snippets.

@ohidurbappy
Created December 12, 2022 17:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ohidurbappy/e0f095a85424e33f31641fe70e8e36dc to your computer and use it in GitHub Desktop.
Save ohidurbappy/e0f095a85424e33f31641fe70e8e36dc to your computer and use it in GitHub Desktop.
Access one container from another container

If you have two or more running container, complete next steps:

docker network create myNetwork
docker network connect myNetwork web1
docker network connect myNetwork web2

Now you connect from web1 to web2 container or the other way round.

Use the internal network IP addresses which you can find by running:

docker network inspect myNetwork
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment