I would like to get the container name by passing container id. I have tried below for getting that but unfortunately it didn't worked for me.
import docker
def get_container_details(self,container=123456789992):
self.client = docker.from_env()
print(self.client.containers.get(container))
May I know what is missing and how to get the container name from container ID