Quick Reference
| Command | Description |
|---|---|
cpln image build | Build and optionally push images |
cpln image docker-login | Authenticate Docker to your org’s registry |
cpln image get | List or view images in your org |
cpln image copy | Copy images between organizations |
cpln image delete | Delete images from your registry |
Build and Push Images
The most common workflow is building and pushing a local application:- Builds your image using the Dockerfile in the current directory
- Tags it for your org’s private registry
- Pushes it to
your-org.registry.cpln.io/my-app:v1
Build Options
- With Dockerfile
- With Buildpacks
| Flag | Description |
|---|---|
--dockerfile | Path to Dockerfile (default: ./Dockerfile) |
--dir | Build context directory (default: current directory) |
--push | Push the image to your org’s private registry after building |
--no-cache | Build without using cache |
--platform, -p | Target platform (default: linux/amd64) |
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
| Format | Description |
|---|---|
//image/IMAGE:TAG | Image in your org’s registry |
ORG.registry.cpln.io/IMAGE:TAG | Image in another org’s registry |
nginx:latest | Public image from Docker Hub |
gcr.io/project/IMAGE:TAG | Image from Google Container Registry |
Authenticate Docker
For direct Docker operations, authenticate to your org’s registry:List and Manage Images
Copy Images Between Orgs
Copy an image to another organization:For cross-org copies with different credentials, use
--to-profile. See the Copy Images guide.CI/CD Authentication
For automated pipelines, setCPLN_TOKEN in your CI/CD platform’s secrets (e.g., GitLab CI/CD variables, GitHub secrets) and use the CLI directly:
CPLN_TOKEN when available.
For direct Docker access, authenticate with a service account:
Troubleshooting
unknown shorthand flag: 'f' in -f
unknown shorthand flag: 'f' in -f
Docker Buildx is not installed. Install it:
Authentication failed or 403
Authentication failed or 403
Re-run
cpln image docker-login to refresh credentials and double check that you don’t have typos in the org name.Push denied
Push denied
Verify you have push permission on images. Check your policies or refresh your service account token.
Image too large
Image too large
Optimize your Dockerfile:
- Use multi-stage builds
- Start from smaller base images
- Remove unnecessary files