cli.fail

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.

Browse all practice ↗

Docker · Intermediate

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?

3 attempts remaining

Read why this fix works

That name is already taken.

docker rename old-api archived-api

Renaming 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 rounds do not affect the daily score or local streak. Try today’s challenge, or choose another scenario.

Copy your result