Hi Lahiru, As your last suggestion it was decided to pass the dependent containers ip address as env variables instead of linking them. Problem is : Airavata-server container need its own containers ip address for api server in the airavata-server.properties file
apiserver.server.host= *<current containers ip address>* And this changes every time container starts. Its not a problem with docker file I believe. Thanks Pankaj On Tue, Jul 7, 2015 at 2:29 AM, Lahiru Ginnaliya Gamathige < [email protected]> wrote: > Hi Pankaj, > > Sorry if I am missing something here. When you automate these and when you > want to parse ip address between containers, you can use hostname inside > the docker images and all the other places and when you run you can parse > the ip with --add-host='hostname:<ip of some dependent container>'. Ex: If > we want to configure rabbitmq ip inside airavata docker image we should not > use IP, instead we can use host name "rabbitmq" and when airavata container > starts you can use --add-host='rabbitmq:<rabbitmq-container-ip>'. > > Now to get the rabbitmq-container-ip you can use docker inspect and > automate it. So if you restart rabbitmq then airavata has to restart > because rabbitmq gets a new address. If I get the situation correct here, I > would just get things working with this limitation. Then if we can get this > working with container linking this issue will anyways go away, any > container can be restarted without much trouble. Can you please send me the > Dockerfile you had the issue with container linking with steps on how to > reproduce ? > > On Mon, Jul 6, 2015 at 10:26 PM, Pankaj Saha <[email protected]> > wrote: > >> Hello Lahiru and Shameera, >> >> I have a situation where docker containers will be part of marathon >> framework to be integrated with mesos. Now containers as an executor may >> stay running or stay idle. Every time containers will get new ip address as >> it starts. >> In the airavata-server properties file for api server we have to provide >> the current running containers ip address, which changes every time >> container starts. Now we need to provide a script such a way that it can >> change the property on container start up automatically instead of doing >> any manual changes. >> >> Please suggest. >> >> Thanks >> Pankaj. >> > >
