Can we have a single container with multiple image ? How can we do this?

harshvardhan upadhyay:
Can we have a single container with multiple image ? How can we do this ?

Ravi Tripathi:
It is not possible as far as i know

Sathish Puranik:
You can have one Pod with multiple containers… But one container with multiple multiple images not possible. You can run one container then exec inside the container and then pull as many image you want…!

harshvardhan upadhyay:
It was one of the question asked in CKA exam…

harshvardhan upadhyay:
maybe at docker level we can create layering of images & run it in K8s

Mohamed Ayman:
You can’t use multi images in a single container but you can have multiple processes it wouldn’t really be a best practice.

Having NGINX and Redis in separate containers but inside the same pod would be better.

You need to look at Docker documentation in order to build a container with multiple processes.

This page seems to give a good overview:
https://docs.docker.com/config/containers/multi-service_container/|https://docs.docker.com/config/containers/multi-service_container/
Also the best practice is to use multi containers pod with an image in separate containers.