Back to Compose

docker compose restart

docs/reference/compose_restart.md

5.1.31.7 KB
Original Source

docker compose restart

<!---MARKER_GEN_START-->

Restarts all stopped and running services, or the specified services only.

If you make changes to your compose.yml configuration, these changes are not reflected after running this command. For example, changes to environment variables (which are added after a container is built, but before the container's command is executed) are not updated after restarting.

If you are looking to configure a service's restart policy, refer to restart or restart_policy.

Options

NameTypeDefaultDescription
--dry-runboolExecute command in dry run mode
--no-depsboolDon't restart dependent services
-t, --timeoutint0Specify a shutdown timeout in seconds
<!---MARKER_GEN_END-->

Description

Restarts all stopped and running services, or the specified services only.

If you make changes to your compose.yml configuration, these changes are not reflected after running this command. For example, changes to environment variables (which are added after a container is built, but before the container's command is executed) are not updated after restarting.

If you are looking to configure a service's restart policy, refer to restart or restart_policy.