Search code examples
dockercontainersibm-cloud

bluemix container KO with ip public but OK in local


I push a container based on NodeJS (from DockerHub) on bluemix. The deployment and the IP public binding are ok but i can't access the website. On my local network from 2 docker engines, the same container is ok and i can access the website.

I tried adding the command "sleep 600" in the "CMD" of my Dockerfile because i read bluemix needs time to build and network container. But after waiting 10 minutes more, it's always KO.

The CMD line of my Dockerfile : CMD sleep 600 && gulp serve-dev

Here the most recent logs of my containers :

[[34mstarterkit-javascript[39m] Watching files...
About to crank up node
PORT=7203
NODE_ENV=dev
PROXY=false
** DEV **
Express server listening on port 7203
env = dev
__dirname = /usr/src/app/starterkit/src/server
process.cwd = /usr/src/app/starterkit

thanks for your help ;)


Solution

  • IBM containers whitelist the ports allowed for external communication.

    Per your log your Node.js application is listening on port 7203 which is not opened, hence you cannot access your app.

    Try using an open port, for example 3000 or 7474.

    If your application needs to use port 7203 you can open a ticket with Bluemix support team and ask this port to be opened:

    http://ibm.biz/bluemixsupport

    For security reasons the complete list of open ports are not documented.