How to restart a single container with docker-compose

后端 未结 9 1865
失恋的感觉
失恋的感觉 2020-12-02 03:27

I have a docker-compose.yml file that contains 4 containers: redis, postgres, api, worker

During the development of worker, I often need to restart it i

9条回答
  •  感动是毒
    2020-12-02 04:21

    Simple 'docker' command knows nothing about 'worker' container. Use command like this

    docker-compose -f docker-compose.yml restart worker

提交回复
热议问题