Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rduque1/ab8cab899cb2a8744d41eb3dcf6a5034 to your computer and use it in GitHub Desktop.
Save rduque1/ab8cab899cb2a8744d41eb3dcf6a5034 to your computer and use it in GitHub Desktop.
Docker compose rebuild and replace container
docker-compose up -d --force-recreate --no-deps --build <SERVICE>
# Options description:
#
#Options:
# -d Detached mode: Run containers in the background,
# print new container names. Incompatible with
# --abort-on-container-exit.
# --force-recreate Recreate containers even if their configuration
# and image haven't changed.
# --build Build images before starting containers.
# --no-deps Don't start linked services.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment