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

412
Vistas
docker-compose does not override a command using the start command

I have a docker-compose override file to use for running tests on containers. I want to start my node server with a different command - nyc node server.js. I have a docker-compose.coverage.yml file that overrides the normal compose file like so:

node:
    command: nyc node server.js

However, it never seems to override the command when I do docker-compose -f docker-compose.yml -f docker-compose.coverage.yml start node. When I use docker-compose run it overrides the command, but the service exits. Does anyone know why it wouldn't be overriding the command using start?

about 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

docker-compose start will start an existing, stopped container. An existing container will already have the command baked in, and you can't change it.

What you want to do is use docker-compose up. This will look for changes to docker-compose.yml, and if there's anything to change, it will recreate the container with the new options, then start or restart it.

So you want something like this:

docker-compose -f docker-compose.yml -f docker-compose.coverage.yml up -d node
about 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