docker get container name code example
Example 1: docker get container ip
docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' container_name_or_id
Example 2: docker list containers
# List history of containers
$ docker ps -a
Example 3: list stopped containers
docker ps --filter "status=exited"
Example 4: docker list containers
# List curently active containers
$ docker ps
Example 5: docker rename a container
/*it does not restart the container */
docker container rename [old name] [new name]