[Yandex Cloud documentation](../../index.md) > [Yandex Container Solution](../index.md) > [Concepts](index.md) > Policies for restarting a Docker container

# Docker container restart policies

You can specify the Docker container restart policies in its description:
* `Always`: Always restart the Docker container when it stops. If you stop the Docker container manually, it only restarts along with the Docker daemon.
* `Never`: Do not restart the Docker container automatically.
* `OnFailure`: Restart the Docker container only if it shut down with a non-zero return code.

If the Docker container description in the metadata changed when restarting the VM, the specified restart policy will be ignored and a Docker container matching the new description will start.

## Use cases {#examples}

* [Transferring logs from Container Optimized Image to Yandex Cloud Logging](../tutorials/coi-fluent-bit-logging.md)
* [Running a containerized app in Yandex Serverless Containers](../tutorials/deploy-app-container.md)
* [Creating a VM from a Container Optimized Image with multiple Docker containers](../tutorials/docker-compose.md)
* [Creating an instance group from a Container Optimized Image with multiple Docker containers](../tutorials/ig-with-containers.md)