We use docker-compose extensively while developing Datafy.it services.
We all know running
docker-compose up creates a new container
project_service_1. This container is reused when the command is rerun.
Today I learned that each
docker-compose run creates new container too. It’s created with the name
project_service_run_X, X being the sequence number.
Sooner or later, the container list can looks like this:
Fortunately, this mess can be cleaned:
Or avoided in the first place, by using the