0

How can i start a container from the public docker hub (registry.hub.docker) on Bluemix? I tried adding the repo url to the public name but I always get "Image not found".

cf ic run -d registry.hub.docker.com/ghost

James Thomas
  • 4,303
  • 1
  • 20
  • 26
Jan
  • 46
  • 1
  • 9

4 Answers4

2

The answer from @Alex da Silva is 100% correct but I found a simpler way.

cpi                 Copy an image from Docker Hub

cf ic cpi SRC DST
Jan
  • 46
  • 1
  • 9
1

You need to first pull it to your docker repository, tag the image to your Bluemix registry and then push image to Bluemix repository.

$ docker pull <image>
$ docker tag <current_image_name_or_ID>:<optional_tag> <private_Bluemix_repository>/<new_image_name>:<optional_tag> 
$ cf ic login
$ docker push <private_Bluemix_repository>/<image_name>
$ cf ic images

See documentation for more details:

https://www.ng.bluemix.net/docs/containers/container_images_adding_ov.html#container_images_pulling

Alex da Silva
  • 4,552
  • 2
  • 17
  • 25
0

Just to note that IBM Bluemix Container Service now offers Kubenetes clusters, these can pull directly from public registries such as Docker Hub and are preconfigured to securely pull private images from IBM Bluemix Container Registry.

Access to the IBM Bluemix Container Registry is via the container-registry plugin to the bx command.

The documentation for the registry can be found here

timgp
  • 79
  • 8
0

as per the documentation here: https://console.bluemix.net/docs/containers/container_images_adding_ov.html#container_images_copying - here is what they say for docker hub images:

Images from Docker Hub Copy images directly from Docker Hub into your private Bluemix registry or pull an image from Docker Hub, modify it locally, and then build it directly in your registry.

You can follow the instructions to pull images from docker hub. Hope this helps.

kashyapa
  • 1,606
  • 1
  • 10
  • 13