Overview
Follow the steps below to push an image to your org’s private image registry. When configuring a workload using the UI, the list of available images stored in your private image registry can be viewed by pressingCTRL+I on your keyboard.
An image can be pushed by using either Docker, the CLI, or any Docker compatible client.
Prerequisites
- Review the image reference page.
- Minimum Policy to push an image.
- Install Docker and the CLI.
Enable Docker Buildx (CLI 3.7.2+)
Beginning withcpln CLI v3.7.2, the cpln image build command shells out to docker buildx build. If the Docker CLI does not have the Buildx plugin installed or enabled, builds fail with errors such as unknown shorthand flag: 'f' in -f. This is common on minimal or self-hosted CI runners (Bitbucket, Jenkins, GitLab, GitHub, etc.) where Docker was installed without extras.
Follow these steps before running cpln image build locally or in CI:
-
Verify Buildx is available
The command should print a Buildx version. If it reports “unknown command”, install or enable the plugin.
-
Install the standalone plugin (Linux runners without Docker Desktop)
Use the binary that matches your OS/architecture (for example,
darwin-arm64for Apple Silicon). Once Buildx is detected bydocker buildx version, reruncpln image build.
Push using Docker
Step 1 - Set up Docker authentication (Required)
Executing the command below will update the local Docker profile to use the CLI to authentication to your private registry when performing the push.Step 2 - Build a new image using Docker and a Dockerfile (Optional)
If you have an existing image, skip to step 3. Executing the command below will containerize your application using the defined Dockerfile. The image generated will be tagged in the format required to push it to your private registry. Always build withdocker buildx build and target the linux/amd64 platform to ensure workloads run consistently across the Control Plane fleet.
Step 3 - Tag an existing image (Optional)
Executing the command below will tag an existing local image in the format required to push it to your private registry. Required Image Name Format:ORG_NAME.registry.cpln.io/IMAGE[:TAG]
If your image is already tagged in this format, skip to step 4.
Step 4 - Push image to your private registry
Executing the command below will authenticate and push the image to your private image registry.Step 5 - Use image in a workload
Once an image has been successfully pushed to your org’s private image registry, it can be referred to by a workload’s container. When setting up a workload, the list of available images stored in your private image registry can be viewed and selected by pressingCTRL+I on your keyboard.
Push using cpln
Another method to push an image to your private registry is by using the CLI’s image build command.Option 1: Using buildpacks
Executing the command below will:- Automatically build the image using buildpacks. No Dockerfile is required.
- Tag it with the required format.
- and push it to your private image registry.
Option 2: Using a Dockerfile
Executing the command below is similar to option 1, but will build the image using Docker and will follow the instructions in the Dockerfile.Starting in
cpln CLI v3.7.2, this command internally runs docker buildx build. Ensure the Docker Buildx plugin is installed/enabled on the machine that runs the CLI.Authentication using a Service Account
In situations where the CLI cannot be used, authentication to your private image registry is achieved by using a Service Account. Use the following parameters to authenticate using Docker or any Docker compatible client:- Registry Server Hostname:
ORG_NAME.registry.cpln.io - Username:
'<token>'The username is the literal string'<token>'(See example below). - Password:
Service Account KeyRefer to the Create a Service Account guide for instructions on how to generate a new key.
Example using Docker
Next Steps
Once an image has been successfully pushed to your org’s private image registry, it can be referred to by a workload’s container. When setting up a workload, the list of available images stored in your private image registry can be viewed and selected by pressingCTRL+I on your keyboard.