[SOLVED] Bring existing / running docker images in rancher

Hello all,
I have Rancher 2.2.1 running in HA on RHEL 7.6. All of this is working.
What I have is two running docker images that were first built with docker build.
What I want to do is bring them into Rancher.

Docker images that I am trying to bring into rancher:


I have never done anything like this before, so at this point, I am trying to figure out what are my options?

Thank you!

  • Push the images to a docker registry like dockerhub using docker push <registry>/<image_name>:<image_tag>
  • Pull the images from your rancher nodes via docker pull <registry>/<image_name>:<image_tag> or, include them in a Kubernetes manifest (deployment/ statefulset etc) to have Kubernetes pull the images via docker.

Thanks gdm!
Now, I have the docker images running on the nodes that are part of rancher cluster.
BUT, how can I bring the pods into Rancher web/GUI?

If you want your docker images to run as Kubernetes pods, then you would have to deploy them using a tool like kubectl and providing it a manifest file, which is a YAML formatted file which describes your pod.

It sounds like you’re new to Kubernetes, try out this online tutorial to deploy your image, as a pod, to mini-kube, a local kubernetes cluster based off vagrant - https://kubernetes.io/docs/tutorials/kubernetes-basics/create-cluster/cluster-interactive/

Take advantage of the regular Rancher on-line training sessions. They are free and cover all the basics. If you can’t wait until the next one, the recordings on these as well as the many other webinars they put on are all on YouTube. Their documentation is also pretty thorough. A little bit of research can take you quite a long way.

You can provide your image via Rancher Chart in Rancher Catalog or your own Catalog, which is an extended Helm Chart.

But if you want to see your image quickly in Rancher Gui, create a project / namespace and run e.g.:
kubectl run ghost --image=ghost:0.9 -n your-namespace-name
And then you can see the image under workloads in Rancher.

Hello all,
Thank you for your time/replies.
So, yes as you figured, I am new to kubernetes; I have been reading “Kubernetes Up & Running” (mentioned in one of the free Rancher training). Great book; helped me a lot with this task and online digging.
I am now stuck with one thing, to deploy “xibosignage/xibo-cms”, as per docs, I need to run docker run with “–link”. I do not know how to do this in yaml file for kubernetes?

Here is exact docker command:

docker run --name xibo-cms-web -p 8080:80  -d \
 		-v /mnt/misc/cms/custom:/var/www/cms/custom -v /mnt/misc/backup:/var/www/backup -v /mnt/misc/cms/web/theme/custom:/var/www/cms/web/theme/custom \
 		-v /mnt/misc/cms/library:/var/www/cms/library -v /mnt/misc/cms/web/userscripts:/var/www/cms/web/userscripts \
 		--link xibo-cms-xmr:50001 xibo-cms1-web:rel1.8

Any pointers for “–link” will be great!

Thank you