Connecting IBM Containers (Dockers) to Watson IoT service instance

I wonder if I can connect my Dockers running in IBM Containers service with a Watson IoT service instance (of course, running in the same organization and space).

I can always assign a public IP to my Docker and connect through the public IP but I think that makes no sense and there is an alternative like I do with other services using something like

  • How do you change default detach key sequence in docker?
  • Docker increase disk space
  • Docker daemon not starting after adding the -H flag
  • Why do docker-compose containers stay alive after finishing up command?
  • Can not connect to Mongo docker instance via mono client on mac
  • Can I add new shared directories to Docker from the command line?
  • -e "CCS_BIND_SRV=My-IoT-Service"

    when starting the Docker.

  • docker-compose up leads to “client and server don't have same version (client : 1.14, server: 1.12)” error but client and server have the same version
  • Creating multiple directories using docker RUN
  • Docker Container Networking with Docker-in-Docker
  • What's a safe minimum disk size for a production Kubernetes node?
  • Restcomm RVD is not running from docker container
  • Docker: Access mysql in docker container using --net=host option from host
  • One Solution collect form web for “Connecting IBM Containers (Dockers) to Watson IoT service instance”

    basically you can directly connect to IBM Watson IoT from your docker container. All you need to know are a couple of credentials. You can either obtain those by reading the VCAP_SERVICES JSON property which can be injected into your container:

    Here is a link explaining this. (Search for VCAP_SERVICES)

    What you also can do is just obtain the credentials from the Bluemix UI and use them accordingly.

    Here a python example how to do this

    Finally, I can recommend this course since it explains all on connectivity in detail

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.