Overview
An image is a lightweight, standalone, executable package that includes everything needed to run an application: code, runtime, system tools, system libraries, and settings. Control Plane uses container images to deploy and run your applications as workloads. Control Plane provides each organization with a private image registry atyour-org.registry.cpln.io. You can also use external registries like Docker Hub, Google Container Registry, or Amazon ECR.
The CLI provides commands to build and push your application to your private image registry.
Private Registry
Each organization has a dedicated private registry hosted by Control Plane. Registry URL format:- No pull secrets required when referencing images in workloads
- Lower latency when pulling images (images are cached at each location where your workload is deployed)
- Built-in access control through Control Plane policies
- Automatic authentication when using the CLI
Image Reference Formats
When configuring a workload’s container image, you can reference images from different sources:| Format | Description | Example |
|---|---|---|
//image/IMAGE:TAG | Image in your org’s private registry | //image/my-app:v1 |
ORG.registry.cpln.io/IMAGE:TAG | Explicit reference to an org’s registry | my-org.registry.cpln.io/my-app:v1 |
IMAGE:TAG | Public image from Docker Hub | nginx:latest |
gcr.io/PROJECT/IMAGE:TAG | Google Container Registry | gcr.io/my-project/my-app:v1 |
ECR_URL/IMAGE:TAG | Amazon Elastic Container Registry | 123456789.dkr.ecr.us-east-1.amazonaws.com/my-app:v1 |
Internal vs External Images
| Aspect | Internal (Private Registry) | External (Docker Hub, GCR, ECR, etc.) |
|---|---|---|
| Authentication | Automatic via Control Plane | Requires pull secrets |
| Latency | Optimized (cached at each deployment location) | Depends on external registry location |
| Access control | Control Plane policies | External registry permissions |
| Build integration | cpln image build --push | Standard docker push |
| Best for | Production workloads, proprietary code | Public images, shared base images |
Building Images
Control Plane supports two methods for building container images:With a Dockerfile
The traditional approach using a Dockerfile to define your image. Use this when you need full control over the build process or have complex build requirements.With Buildpacks
Cloud Native Buildpacks automatically detect your application language and create an optimized container image without a Dockerfile. Buildpacks are ideal for standard application frameworks and reduce the need to maintain Dockerfiles.For detailed language-specific requirements and conventions, see the Buildpacks Guide.
Image Lifecycle
- Build: Create the image locally using
cpln image build(with Dockerfile or buildpacks) - Push: Upload to your org’s private registry with the
--pushflag ordocker push - Reference: Configure your workload to use the image via
//image/IMAGE:TAG - Deploy: Control Plane pulls and runs the image across your configured locations
Getting Started with the CLI
For practical examples on building, pushing, and managing images, see Images in the CLI Reference.As of
cpln CLI v3.7.2, cpln image build executes docker buildx build. If Buildx is missing from the Docker CLI, the command fails with errors like unknown shorthand flag: 'f' in -f. Follow Docker’s Buildx installation guide or the steps in the Push an Image guide to install/enable the plugin (especially on CI runners) before building via the CLI.Push an Image
Refer to the Push an Image guide for additional details.Pull an Image
Refer to the Pull an Image guide for additional details.Copy an Image
Refer to the Copy an Image guide for additional details.Update a Workload Image
To update the image used by a workload’s container:Use the convention
//image/IMAGE:TAG to reference an image residing within the current org’s private registry.Dynamic Tags
EnablesupportDynamicTags on a workload to automatically redeploy when an image tag’s underlying digest changes. This is useful for:
- Mutable tags like
latestordev - CI/CD pipelines that update the same tag
- Automatic rollout of security patches to base images
Image Tags and Digests
Tags are human-readable labels pointing to a specific image version:Permissions
The permissions below are used to define policies together with one or more of the four principal types:| Permission | Description | Implies |
|---|---|---|
| create | Create new image. You can push if you can create images. | pull |
| delete | Delete | |
| edit | Modify existing image (only tags can be changed) | view |
| manage | Full access | create, delete, edit, manage, pull, view |
| pull | Image can be pulled | view |
| view | Read-only access |
Minimum Policy
Push
At a minimum, thecreate permission must be bound to the principal pushing an image to an org’s private registry.
Using the console UI, follow these steps to create a least privileged policy which will allow a principal to push an image:
- Click
Policiesin the left menu bar and click theNewbutton at the top of the form. - Enter a policy name, select
imagefrom the Target Kind pulldown, and enable theTarget All Imagesbutton. Click theNextbutton. - Click
Add Binding. - Select the
createpermission. Select the principal type that will be pushing the image from the top menu bar and select the principal. ClickAdd. - Click
Create.
Pull
At a minimum, thepull permission must be bound to a principal pulling an image from an org’s private registry.
Unless the policy targets all images, a query must be created with the image names (without the tag) that the principal is allowed to pull. That query uses the property parameter and can only be created/updated using cpln apply or the CLI’s cpln policy command.
Below is a sample JSON manifest used as input to cpln apply.
Notice that the property parameter is equal to repository.
Update the POLICY_NAME, ORG_NAME, USER_EMAIL, SERVICE_ACCOUNT_NAME, and IMAGE_NAME tokens.
The principalLinks can refer to a user or service account.
JSON
docker pull ...).
Access Report
Displays the permissions granted to principals for the image. Available in the console UI or via the CLI withcpln image access-report IMAGE:TAG.