Build Based on Existing Image

CCR

  • Enterprise Edition API Reference
    • Appendix
    • Common Headers and Error Code
    • Enterprise Edition Instance APIs
    • Helm Chart Management Interface
    • Image access control APIs
    • Image Access Credential APIs
    • Image API
    • Image Migration APIs
    • Image On-demand Loading APIs
    • Image Registry APIs
    • Image Synchronization APIs
    • Namespace APIs
    • Overview
    • Service domain
    • Trigger APIs
  • Enterprise Edition Go-SDK
    • Enterprise Edition Instance
    • Initialization
    • Install the SDK Package
    • Overview
  • Enterprise Edition Operation Guide
    • Access configuration
      • Configure Access credentials
      • Configure Custom Endpoint
      • Configure IAM Access Control
      • Configure IAM Tag Permission Policy
      • Configure Robot Account
      • Network Access Control
        • Configure public network access control
        • Configure virtual private cloud access control
        • Network Access Control Overview
    • Container DevOps
      • Manage Trigger
    • Create Enterprise Edition Instance
    • Distribution Management
      • Cross-Instance Synchronization of Image
      • On-Demand Loading of Container Image
      • Using P2P Acceleration in CCE Clusters
    • Event notification
      • Configure Event Notification Alert
      • Image Push Failure Error Code and Handling Methods
    • Image Build
      • Build Based on Existing Image
    • Image Cleanup
      • Clean BOS Storage Space
      • Delete image version
      • Version Retention
    • Image Migration
      • Migrate External Image to Enterprise Edition Instance
    • Image security
      • Immutable image version
      • Security Scanning Container Image
    • Manage Namespace
    • OCI Artifact Management
      • Manage Helm Chart
      • Manage Image Registry
      • OCI Artifact Management Overview
  • Function Release Records
  • Personal Edition API Reference
    • Helm API
    • Image API
    • Image Migration APIs
    • Image Version and Image Version Scanning Interface
    • Namespace APIs
    • Overview
    • User APIs
  • Personal Edition Documentation Set
    • Account Permission Management
    • Cloud Container Engine (CCE) migration to CCR
    • Container Image Service Basic Operations
    • How to Perform Image Scanning
    • How to Upload Helm Chart
    • How to use the DockerHub image accelerator
  • Product Announcement
    • CCR Enterprise Edition Pricing Announcement
    • CCR Enterprise Edition Public Beta Announcement
    • CCR Personal Edition Announcement on Closing New Entry
    • CCR Personal Edition Announcement on Disabling Image Scanning Function
  • Product introduction
    • Core concepts
    • Enterprise Edition Different Specifications Differentiation Description
    • Key functions
    • Product advantages
    • Product Introduction
  • Product pricing
    • Billing overview
  • Quick Start
    • Enterprise Edition Quick Start
    • How to Build Docker Image
  • Service Level Agreement (SLA)
    • CCR Enterprise Edition Service Level Agreement
All documents
menu
No results found, please re-enter

CCR

  • Enterprise Edition API Reference
    • Appendix
    • Common Headers and Error Code
    • Enterprise Edition Instance APIs
    • Helm Chart Management Interface
    • Image access control APIs
    • Image Access Credential APIs
    • Image API
    • Image Migration APIs
    • Image On-demand Loading APIs
    • Image Registry APIs
    • Image Synchronization APIs
    • Namespace APIs
    • Overview
    • Service domain
    • Trigger APIs
  • Enterprise Edition Go-SDK
    • Enterprise Edition Instance
    • Initialization
    • Install the SDK Package
    • Overview
  • Enterprise Edition Operation Guide
    • Access configuration
      • Configure Access credentials
      • Configure Custom Endpoint
      • Configure IAM Access Control
      • Configure IAM Tag Permission Policy
      • Configure Robot Account
      • Network Access Control
        • Configure public network access control
        • Configure virtual private cloud access control
        • Network Access Control Overview
    • Container DevOps
      • Manage Trigger
    • Create Enterprise Edition Instance
    • Distribution Management
      • Cross-Instance Synchronization of Image
      • On-Demand Loading of Container Image
      • Using P2P Acceleration in CCE Clusters
    • Event notification
      • Configure Event Notification Alert
      • Image Push Failure Error Code and Handling Methods
    • Image Build
      • Build Based on Existing Image
    • Image Cleanup
      • Clean BOS Storage Space
      • Delete image version
      • Version Retention
    • Image Migration
      • Migrate External Image to Enterprise Edition Instance
    • Image security
      • Immutable image version
      • Security Scanning Container Image
    • Manage Namespace
    • OCI Artifact Management
      • Manage Helm Chart
      • Manage Image Registry
      • OCI Artifact Management Overview
  • Function Release Records
  • Personal Edition API Reference
    • Helm API
    • Image API
    • Image Migration APIs
    • Image Version and Image Version Scanning Interface
    • Namespace APIs
    • Overview
    • User APIs
  • Personal Edition Documentation Set
    • Account Permission Management
    • Cloud Container Engine (CCE) migration to CCR
    • Container Image Service Basic Operations
    • How to Perform Image Scanning
    • How to Upload Helm Chart
    • How to use the DockerHub image accelerator
  • Product Announcement
    • CCR Enterprise Edition Pricing Announcement
    • CCR Enterprise Edition Public Beta Announcement
    • CCR Personal Edition Announcement on Closing New Entry
    • CCR Personal Edition Announcement on Disabling Image Scanning Function
  • Product introduction
    • Core concepts
    • Enterprise Edition Different Specifications Differentiation Description
    • Key functions
    • Product advantages
    • Product Introduction
  • Product pricing
    • Billing overview
  • Quick Start
    • Enterprise Edition Quick Start
    • How to Build Docker Image
  • Service Level Agreement (SLA)
    • CCR Enterprise Edition Service Level Agreement
  • Document center
  • arrow
  • CCR
  • arrow
  • Enterprise Edition Operation Guide
  • arrow
  • Image Build
  • arrow
  • Build Based on Existing Image
Table of contents on this page
  • Related concepts
  • Prerequisites
  • Usage restrictions
  • Operation steps
  • Example
  • Build an image based on an existing image
  • Build an image based on Dockerfile

Build Based on Existing Image

Updated at:2025-11-03

The Cloud Container Registry (CCR) enterprise edition allows for quickly building new container images from existing ones and automatically pushing completed builds to the image registry. This document outlines the process of building images with the enterprise container image and provides examples for varied scenarios.

Related concepts

Image: A specialized file system containing programs, registries, resources, configurations, etc., necessary for container runtime. It essentially encapsulates the software runtime environment.

Dockerfile: A text file for image building, including commands, dependency lists and some key notes required in the image building process. For Dockerfile syntax, refer to its Official Document.

Prerequisites

  • Successfully [Create Enterprise Edition Instance](CCR/Enterprise Edition Operation Guide/Create Enterprise Edition Instance.md).
  • Each instance must contain at least one namespace. For detailed information, refer to [Manage Namespace](CCR/Enterprise Edition Operation Guide/Manage Namespace.md).

Usage restrictions

  • Only container images with the amd64 architecture are supported for building.
  • Building container images larger than 50 GB is not supported.

Operation steps

  1. Sign in to Cloud Container Registry Console.
  2. Select Instance List in the left navigation bar to enter the management page.
  3. Select Image Registry in the left navigation bar to enter the Image Registry page.
  4. Click on the target image registry to access the image management page.
  5. Select Image Build in the left navigation bar to enter the Image Build page.
  6. Click Create Image Build to enter the creation page and complete relevant configurations:
ConfigMap Required/Optional Configuration
Construction method Required Select the image build method, which supports building based on an existing image or Dockerfile. Currently, an example is given based on an existing image.
Container image Required Select the image registry for building. You can opt for an existing registry from the Cloud Container Registry (CCR) or directly provide the access address of an external registry, ensuring it is accessible.
Image version Required Choose the version of the image for building. You can select an existing version from the Cloud Container Registry (CCR) or directly provide the version from an external registry.
Dependency Required Install additional dependencies based on the chosen container image. Multiple dependencies are supported, and installation can be done via apt, pip2, pip3, or yum.
Image version Required Enter the version of the newly created image. The version can include uppercase and lowercase letters, numbers, and the special characters "." and "-". It must begin with either a letter or a number and have a length between 1 and 127 characters.
  1. Click OK to start performing the image build task. Once the status changes to Build Succeeded, the newly built container image can be used on the version management page.
  2. If the status changes to Build Failed, click View Build Log to troubleshoot the issue.

Example

Build an image based on an existing image

Describe how to create custom images by installing additional dependencies based on images stored in the Cloud Container Registry (CCR).

  1. Click Select Image on the Create Image Build page, and choose an eligible existing image in the CCR enterprise or personal edition from the image list.
  2. Click Select Version, and then choose an eligible existing image version from the version list.
  3. Choose different installation methods and specific dependency versions based on existing images. To install vim in the base image, select the apt installation method and input "vim" in the relevant field. To install Python3-related dependency packages, select pip3 and input the corresponding dependency package name and version.

    image.png

    • pip2 and pip3 correspond to the installation methods for Python2 and Python3 dependencies respectively, and are not installed simultaneously in general.
    • apt and yum correspond to the installation methods for Ubuntu and CentOS dependencies respectively, and are not installed simultaneously in general.
  4. Enter the newly built image version name, and click OK to start building image.

Build an image based on Dockerfile

Explain how to initiate a custom image build using a Dockerfile and by writing a Dockerfile according to the required specifications. Below is an example Dockerfile:

Plain Text
1    # Configure base image
2    FROM ubuntu:18.04
3# Install a series of APT dependencies
4    RUN apt-get update && apt-get install -y --no-install-recommends \
5      python3-pip \
6      vim && \
7      apt-get clean && \
8      rm -rf /var/lib/apt/lists/*
9# Install a series of PIP dependencies
10    RUN pip3 install\
11      numpy==1.19.5 \
12      scipy==1.5.4
13# Configure timezone
14    RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
Plain Text
1 >**Description:**
2 >
3 >When configuring base images, enter the base image address after the `FROM` field.

Previous
Event notification
Next
Image Cleanup