Practice this fail.
That name is already taken.
Docker · Restart as often as you like
Read the error, choose a command, and learn
why it works. Nothing runs on your machine.
An exited container named old-api must be kept for inspection. Rename it to archived-api so its old name becomes available. archived-api is unused.
That name is already taken.
$ docker run --name old-api alpine
Conflict: container name is already in use.
How do you free the name while preserving the old container?
Fixed. By hand.
docker rename old-api archived-apiRenaming changes the container’s name without deleting it. The old name can then be reused by another container; a stopped container still reserves its name until renamed or removed.
Practice does not affect your daily score or streak.