DEV Community

Goffity Corleone
Goffity Corleone

Posted on

4 3

Restart Rebuild and ReCreate container on docker compose v2

I want to use docker compose to deploy a new version of an application, However, I do not want to down the compose project and eliminate the volume of other services.

  1. Remove any services that are attempting to deploy.
  2. Start service.
docker compose rm -s -v -f ${service_name}
docker compose up -d ${service_name}
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay