Yandex.Cloud
  • Services
  • Why Yandex.Cloud
  • Solutions
  • Pricing
  • Documentation
  • Contact us
Get started
Yandex Container Registry
  • Getting started
  • Step-by-step instructions
    • All instructions
    • Authentication in Yandex Container Registry
    • Managing a Docker image
      • Getting information about available Docker images
      • Creating a Docker image
      • Pushing a Docker image to a registry
      • Pulling a Docker image from a registry
      • Deleting a Docker image from a registry
    • Managing a registry
      • Getting information about existing registries
      • Creating a registry
      • Updating a registry
      • Deleting a registry
    • Managing a repository
      • Getting information about existing repositories
    • Managing policies for automatically deleting Docker images
      • Getting information about existing lifecycle policies
      • Creating a lifecycle policy
      • Updating a lifecycle policy
      • Performing lifecycle policy dry runs
      • Deleting a lifecycle policy
    • Working with roles
      • Assign a role
      • Viewing assigned roles
      • Revoke a role
  • Yandex Container Solution
  • Use cases
    • All use cases
    • Running a Docker image on a VM
  • Concepts
    • Overview
    • Docker image
    • Registry
    • Repository
    • Policies for automatically deleting Docker images
    • Backups
    • Quotas and limits
  • Access management
  • Pricing policy
  • API reference
    • Authentication in the API
    • gRPC
      • Overview
      • ImageService
      • LifecyclePolicyService
      • RegistryService
      • RepositoryService
      • ScannerService
      • OperationService
    • REST
      • Overview
      • Image
        • Overview
        • delete
        • get
        • list
      • LifecyclePolicy
        • Overview
      • Registry
        • Overview
        • create
        • delete
        • get
        • list
        • listAccessBindings
        • setAccessBindings
        • update
        • updateAccessBindings
      • Repository
        • Overview
        • get
        • list
        • listAccessBindings
        • setAccessBindings
        • updateAccessBindings
      • Scanner
        • Overview
  • Troubleshooting
  • Questions and answers
  1. Step-by-step instructions
  2. Managing a Docker image
  3. Pushing a Docker image to a registry

Pushing a Docker image to a registry

    These instructions describe how to push a local Docker image to a registry.

    Note

    To push an image, you need to authenticate in the registry.

    CLI
    1. View the list of available Docker images:

      docker image list
      REPOSITORY                              TAG                 IMAGE ID            CREATED             SIZE
      cr.yandex/crpd50616s9a2t7gr8mi/ubuntu   hello               50ff4b0e5783        23 hours ago        86.7MB
      ubuntu                                  latest              1d9c17228a9e        2 weeks ago         86.7MB
      
    2. (option) Assign a tag like cr.yandex/<registry ID>/<Docker image name>:<tag> to the Docker image:

      docker tag ubuntu \
      cr.yandex/crpd50616s9a2t7gr8mi/ubuntu:example
      

      Note

      You can only push to Container Registry Docker images tagged with cr.yandex/<registry ID>/<Docker image name>:<tag>.

    3. Push the required Docker image to the registry:

      docker push cr.yandex/crpd50616s9a2t7gr8mi/ubuntu:hello
      
    4. Make sure the image has been added to the registry. To do this, get a list of Docker images in the registry.

    Language / Region
    Careers
    Privacy policy
    Terms of use
    Brandbook
    © 2021 Yandex.Cloud LLC