You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@airavata.apache.org by Pankaj Saha <ps...@binghamton.edu> on 2015/06/17 17:45:21 UTC

docker container connection with host system

Once a docker container is running how can the host system be able to
communicate to the running image?

I believe there is a command EXPOSE <port number> to make one application
exposed to the host through the mentioned port. In airavata we need several
applications (rabbiMQ,Zookeeper etc) to run on different ports inside their
container and should be able to communicate.

Currently airavata-service.sh is the one point which invokes all the
rquired applications and keep them alive on specific ports.

After dockerising how can that be possible? Do we need to change the
airavata-service.sh file to be changed?

Thanks
Pankaj

Re: docker container connection with host system

Posted by Pankaj Saha <ps...@binghamton.edu>.
Hi Lahiru,

do you think after doing
          docker run -p 127.0.0.1:8585:80 --name container -t
airavata_pga:02
from my localhost, I should able to see the pga portal in port 8585?

docker ps -a shows:
CONTAINER ID        IMAGE                        COMMAND
 CREATED             STATUS                         PORTS
 NAMES
adea2324c8ee        airavata_pga:02              "/bin/bash"            59
seconds ago      Up 58 seconds                  127.0.0.1:8595->80/tcp
container02

But I can not see anything in 8585 port in local host.


Thanks
Pankaj

On Wed, Jun 17, 2015 at 1:00 PM, Lahiru Ginnaliya Gamathige <
glahiru@gmail.com> wrote:

> Hi Pankaj,
>
> With dockerizing each component has to be a docker container. Ex: I am
> sure you can find a zookeeper docker image in docker hub, same thing to
> other third party components. We should run airavata isolate in one
> container which should be able to connect to other containers. You need to
> do -p hostport:container port to export desired port to the outside world
> (Ex:port 80) if you want to communicate internally (If those components are
> docker containers, IMO all of these components should be containerized) you
> have to link containers when you run the image with --link which will link
> containers.
>
>
> Regards
> Lahiru
>
> On Wed, Jun 17, 2015 at 8:45 AM, Pankaj Saha <ps...@binghamton.edu>
> wrote:
>
>> Once a docker container is running how can the host system be able to
>> communicate to the running image?
>>
>> I believe there is a command EXPOSE <port number> to make one application
>> exposed to the host through the mentioned port. In airavata we need several
>> applications (rabbiMQ,Zookeeper etc) to run on different ports inside their
>> container and should be able to communicate.
>>
>> Currently airavata-service.sh is the one point which invokes all the
>> rquired applications and keep them alive on specific ports.
>>
>> After dockerising how can that be possible? Do we need to change the
>> airavata-service.sh file to be changed?
>>
>> Thanks
>> Pankaj
>>
>
>

Re: docker container connection with host system

Posted by Lahiru Ginnaliya Gamathige <gl...@gmail.com>.
Hi Pankaj,

With dockerizing each component has to be a docker container. Ex: I am sure
you can find a zookeeper docker image in docker hub, same thing to other
third party components. We should run airavata isolate in one container
which should be able to connect to other containers. You need to do -p
hostport:container port to export desired port to the outside world
(Ex:port 80) if you want to communicate internally (If those components are
docker containers, IMO all of these components should be containerized) you
have to link containers when you run the image with --link which will link
containers.


Regards
Lahiru

On Wed, Jun 17, 2015 at 8:45 AM, Pankaj Saha <ps...@binghamton.edu> wrote:

> Once a docker container is running how can the host system be able to
> communicate to the running image?
>
> I believe there is a command EXPOSE <port number> to make one application
> exposed to the host through the mentioned port. In airavata we need several
> applications (rabbiMQ,Zookeeper etc) to run on different ports inside their
> container and should be able to communicate.
>
> Currently airavata-service.sh is the one point which invokes all the
> rquired applications and keep them alive on specific ports.
>
> After dockerising how can that be possible? Do we need to change the
> airavata-service.sh file to be changed?
>
> Thanks
> Pankaj
>