Yandex Cloud
Search
Discuss with expertTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Yandex Compute Cloud
  • Yandex Container Solution
    • All tutorials
    • Configuring time synchronization using NTP
    • Autoscaling an instance group to process messages from a queue
    • Updating an instance group under load
    • Deploying Remote Desktop Gateway
    • Getting started with Packer
    • Transferring logs from a VM to Yandex Cloud Logging
    • Building a VM image with infrastructure tools using Packer
    • Migrating data to Yandex Cloud using Hystax Acura
    • Fault protection with Hystax Acura
    • Backing up a VM with Hystax Acura
    • Deploying a fault-tolerant architecture with preemptible VMs
    • Configuring a fault-tolerant architecture in Yandex Cloud
    • Creating a budget trigger that invokes a function to stop a VM
    • Creating triggers that invoke a function to stop a VM and send a Telegram notification
    • Creating a Python web application with Flask
    • Creating an SAP program in Yandex Cloud
    • Deploying a Minecraft server in Yandex Cloud
    • Automating image builds using Jenkins and Packer
    • Creating test VMs via GitLab CI
    • High-performance computing on preemptible VMs
    • Configuring an SFTP server based on CentOS 7
    • Deploying GlusterFS in high availability mode
    • Deploying GlusterFS in high performance mode
    • Backing up to Object Storage with Bacula
    • Building a CI/CD pipeline in GitLab using serverless products
    • Implementing a secure high-availability network infrastructure with a dedicated DMZ based on the Check Point NGFW
    • Cloud infrastructure segmentation with the Check Point next-generation firewall
    • Configuring a secure GRE tunnel over IPsec
    • Creating a bastion host
    • Implementing fault-tolerant scenarios for NAT VMs
    • Creating a tunnel between two subnets using OpenVPN Access Server
    • Creating an external table from an Object Storage bucket table using a configuration file
    • Setting up network connectivity between BareMetal and Virtual Private Cloud subnets
    • Working with snapshots in Managed Service for Kubernetes
      • Creating a VM from a Container Optimized Image
      • Creating a VM from a Container Optimized Image with an additional volume for a Docker container
      • Creating a VM from a Container Optimized Image with multiple Docker containers
      • Creating an instance group from a Container Optimized Image
      • Creating an instance group from a Container Optimized Image with multiple Docker containers
      • Updating a Container Optimized Image VM
      • Creating a VM and an instance group with a Container Optimized Image using Terraform
    • Running the DeepSeek-R1 language model in a GPU cluster
    • Running a vLLM library with the Gemma 3 language model on a VM with GPU
    • Delivering USB devices to a virtual machine or BareMetal server
    • Running a Docker image on a VM using Cloud Registry
    • Deploying a SourceCraft worker on a VM
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Release notes
  1. Tutorials
  2. Container Optimized Image
  3. Updating a Container Optimized Image VM

Updating a Container Optimized Image VM

Written by
Yandex Cloud
Updated at May 5, 2026

Change the Docker container settings on the VM you created from a Container Optimized Image.

Management console
CLI
  1. In the management console, select the folder where you created the VM.
  2. Navigate to Compute Cloud.
  3. Click the row with the VM you want to update.
  4. In the top panel, click Edit VM
  5. Modify the Docker container settings section as required.
  6. Click Save changes.
  1. View the description of the CLI command for updating VMs:

    yc compute instance update-container --help
    
  2. Get the unique VM ID. To do this, click the row with the VM name under Compute Cloud in the management console or use this CLI command:

    yc compute instance list
    

    Result:

    +----------------------+-------+-------------------+---------+----------------------------------+-------------+
    |          ID          | NAME  |      ZONE ID      | STATUS  |           EXTERNAL IP            | INTERNAL IP |
    +----------------------+-------+-------------------+---------+----------------------------------+-------------+
    | epdbf646ge5q******** | my-vm | ru-central1-b     | RUNNING | 84.201.155.117                   | 172.18.0.21 |
    +----------------------+-------+-------------------+---------+----------------------------------+-------------+
    
  3. Update the VM.

    Depending on how you created the VM, there are several ways to update it:

    Creation method Update the VM using
    --container-image
    Update the VM using
    --docker-compose-file
    Using the --container-* parameters The system deletes the old Docker container and creates a new one. The system deletes the old Docker container and creates new containers as per the docker-compose.yaml file.
    Using the docker-compose.yaml file specification The system deletes the old Docker containers as per docker-compose.yaml and creates a new container described using the --container-* parameters. The system only creates either new Docker containers, i.e., those added to docker-compose.yaml, or modified containers. The system deletes the Docker containers missing from the new docker-compose.yaml file.
    • Update the VM by setting new parameters:

      yc compute instance update-container epdbf646ge5q******** \
        --container-name=my_vm_new_version \
        --container-image=cr.yandex/mirror/ubuntu:18.04 \
        --container-env=KEY1=VAL1,KEY2=VAL2 \
        --remove-container-env=KEY3 \
        --container-stdin=false \
        --container-restart-policy=Never
      

      Where:

      • --container-name: Docker container name.
      • --container-image: Name of the Docker image used to run the Docker container.
      • --container-env: Environment variables available in the Docker container.
      • --remove-container-env: Exclude the environment variables whose keys are specified in the parameter.
      • --container-command: Command to run when you start the Docker container.
      • --container-stdin: Allocate the buffer for the input stream while running the Docker container.
      • --container-restart-policy: Parameters for the command specified in --container-command.
      • --container-privileged: Run the Docker container in privileged mode.

      Result:

      done (2s)
      id: epdbf646ge5q********
      folder_id: b1g88tflru0e********
      created_at: "2023-03-13T09:44:03Z"
      name: my-vm
      ...
      
    • Update the VM by setting the specifications of multiple Docker containers:

      yc compute instance update-container epdbf646ge5q******** --docker-compose-file=<path_to_file>
      

      Where --docker-compose-file is the path to the Docker container spec file.

      Result:

      done (2s)
      id: fhma9omhj2e7********
      folder_id: b1g88tflru0e********
      created_at: "2023-03-13T17:08:48Z"
      name: coi-vm
      ...
      

Was the article helpful?

Previous
Creating an instance group from a Container Optimized Image with multiple Docker containers
Next
Creating a VM and an instance group with a Container Optimized Image using Terraform
© 2026 Direct Cursus Technology L.L.C.