Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

340
Vistas
What's the difference between 'down' and 'rm' in docker/docker-compose?

The docs for docker-compose down, docker-compose rm, and docker rm all read very similarly. What's the difference? And when would you use one over the others?

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

  • "docker-compose down": stop and remove the container with all the networks (but not volumes), you should add -v option to do that.
  • "docker-compose rm": remove stopped only containers, but not running containers, you should add option -s to be able to remove running containers

Now, the diffrence between "docker-compose rm" and "docker rm", is that when you make changes affecting the container in the docker-compose.yml file, you can't remove the container created by the old docker-compose.yml using "docker-compose rm", so in this case you should use "docker rm" to do that.

If you still don't get it, you can try this example:

  1. Run a container using "docker-compose up"
  2. Now stop the container without removing it using "docker-compse stop"
  3. Change the name of the container in the docker-compose.yml
  4. Run "docker-compose up" --> a new container will be created with the new name.
  5. Now if you try to remove the old container using "docker-compose rm old_container_name", you will get this error: No such service.
  6. In this case you can only remove the old container using "docker container rm old_container_name".
over 4 years ago · Santiago Trujillo Denunciar

0

rm - Removes stopped service containers.

down - Stops containers and removes containers, networks, volumes, and images created by up.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda