Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
    • Yandex Cloud Partner program
  • Blog
  • Pricing
  • Documentation
© 2025 Direct Cursus Technology L.L.C.
Yandex Container Solution
  • Comparison with other Yandex Cloud services
  • Getting started
    • Container Optimized Image
    • Working with disks
    • Working with the network
    • Docker image
    • Policies for restarting a Docker container
    • Docker container specifications
    • Quotas and limits
  • Pricing policy
  • Container Optimized Image releases
  • FAQ
  • Troubleshooting
  1. Concepts
  2. Policies for restarting a Docker container

Docker container restart policies

Written by
Yandex Cloud
Updated at April 18, 2025

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

  • Transferring logs from Container Optimized Image to Yandex Cloud Logging
  • Running a containerized app in Yandex Serverless Containers
  • Creating a VM from a Container Optimized Image with multiple Docker containers
  • Creating an instance group from a Container Optimized Image with multiple Docker containers

Was the article helpful?

Previous
Docker image
Next
Docker container specifications
© 2025 Direct Cursus Technology L.L.C.