Access service running in docker container from inside another docker container

前端 未结 2 1898
遇见更好的自我
遇见更好的自我 2021-01-20 19:50

At the moment I\'m running a node.js application inside a docker container which needs to connect to camunda, which runs in another container.

I start the container

2条回答
  •  执笔经年
    2021-01-20 19:57

    Original answer below. Note that link has been deprecated and the recommended replacement is network. That is explained in the answer to this question: docker-compose: difference between network and link

    -- Use the --link camunda:camunda option for your app container. Then you can access camunda via http://camunda:8080/.... The link option adds a entry to the /etc/hosts file of the app container with the IP address of the camunda container. This also means you have to restart your app container if you restart the camunda container.

提交回复
热议问题