Skip to main content
The CLI provides powerful commands for working with container images. Build locally, push to your org’s private registry, pull from external registries, and copy images between organizations.

Quick Reference

Build and Push Images

The most common workflow is building and pushing a local application:
This command:
  1. Builds your image using the Dockerfile in the current directory
  2. Tags it for your org’s private registry
  3. Pushes it to your-org.registry.cpln.io/my-app:v1
No Docker on this machine or CI runner? Add --remote to build remotely — the image is built and pushed for you: cpln image build --name my-app:v1 --remote.

Build Options

When --dir is specified, the Dockerfile in that directory is used by default. Use --dockerfile to override this behavior.

Use Images in Workloads

Reference your pushed images when creating workloads:

Image Reference Formats

Authenticate Docker

For direct Docker operations, authenticate to your org’s registry:
Then use standard Docker commands:

List and Manage Images

Copy Images Between Orgs

Copy an image to another organization:
Copy with a different name:
For cross-org copies with different credentials, use --to-profile. See the Copy Images guide.

CI/CD Authentication

For automated pipelines, set CPLN_TOKEN in your CI/CD platform’s secrets (e.g., GitLab CI/CD variables, GitHub secrets) and use the CLI directly:
The CLI automatically uses CPLN_TOKEN when available. On runners without a Docker daemon, swap --push for --remote and the image is built and pushed remotely instead:
For direct Docker access, authenticate with a service account:
See CI/CD Usage for complete automation setup.

Troubleshooting

Start Docker, or build without it:
A remote build uploads the whole build folder. Exclude what the build does not need by adding the large paths to .dockerignore, then re-run the build.
Docker Buildx is not installed. Install it:
Re-run cpln image docker-login to refresh credentials and double check that you don’t have typos in the org name.
Verify you have push permission on images. Check your policies or refresh your service account token.
Optimize your Dockerfile:
  • Use multi-stage builds
  • Start from smaller base images
  • Remove unnecessary files

Learn More

Buildpacks Guide

Language-specific conventions for building without Dockerfiles

Push Images

Detailed guide for building and pushing images

Pull Images

Configure workloads to pull from private registries

Image Command Reference

Full command documentation