accessing a docker container from another container

后端 未结 4 1293
野性不改
野性不改 2020-12-04 20:28

i created two docker containers based on two different images. one of db and another for webserver. both containers are running on my mac osx.

i can access db conta

4条回答
  •  佛祖请我去吃肉
    2020-12-04 21:18

    You will have to access db through the ip of host machine, or if you want to access it via localhost:1521, then run webserver like -

    docker run --net=host --name oracle-wls wls-image:latest
    

    See here

提交回复
热议问题