In this article, we will see the solution for “the container name / is already in use by container”.
The means we have already started a container in the past with the name and we are trying to create another with the name.
2. Solution: We need to delete that first before we can re-create a container with the same name using below command.
docker rm updated
2. Now we have to start the container, then the above error will be gone.
docker run -d --name updated -P nginx-updated