Rename a container in Docker

In this tutorial, I show you how to rename a container in Docker.

For example, now, Docker in my machine is running a container as follows:

This is a container that is run from SonarQube’s Docker Image, when I ran it, I forgot to give it a name to make it easy to distinguish if I later run other Docker containers. Currently, its name is recursing_ardinghelli, I will rename it again using the following command:

For example, I changed the name of my container using the following command:

Result:

Add Comment