Search code examples
dockeribm-cloud

How to access a container from a Bluemix app?


I've created a container which is listening on port 56789. The container have a private IP 172.xxx.xxx.xxx

I tried to connect from an application that I've deployed in Bluemix but I always get an error Error: connect ECONNREFUSED 172.xxx.xxx.xxx:56789

I tried to bind a public IP and try to connect doing telnet but I can't connect either

The docker container has an application that opens a socket in the port 56789

Any thoughts what I'm doing wrong?

Thanks


Solution

  • You will not be able to reach an IBM Container from a Bluemix application using the private container IP, since the environments are in different networks.

    You have to assign a public IP to your IBM container as you are doing, but also your application in the container needs to run in an open port.

    The IBM container has a firewall and it whitelists the open ports, 56789 is not in the list, hence you cannot even telnet to the container using this port.

    If you can use a random port try port 50000 for your test.

    For security reasons the list of open ports is not externally documented - if you need a particular port to be opened please open a ticket with Bluemix support:

    http://ibm.biz/bluemixsupport