Reputation: 46
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
Upvotes: 0
Views: 465
Reputation: 1626
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.
Upvotes: 0
Reputation: 79
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
Upvotes: 0
Reputation: 46
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
Upvotes: 2
Reputation: 4590
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
Upvotes: 1