Quick Reference
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
- Without Docker (remote)
When
--dir is specified, the Dockerfile in that directory is used by default. Use --dockerfile to override this behavior.Build Arguments
--build-arg sets a value the Dockerfile reads with ARG. It takes docker’s own two forms: a NAME=value pair, or a bare NAME whose value comes from your environment.
A bare
NAME that is unset in your environment sends nothing, so the Dockerfile’s own ARG default applies. A build with no Dockerfile prints a warning naming the arguments it could not consume and continues, since buildpack builds have no ARG mechanism.Build Secrets
--secret exposes a credential to a single RUN step. Unlike a build argument, the value is mounted as a file for the length of that step only: it never lands in the image, its layers, or its build cache.
The option takes docker’s own form, id=<id>[,src=<source>], and src additionally accepts a secret in your org.
id, at /run/secrets/<id>:
src accepts
A
--remote build accepts only the cpln://secret/... sources. The build service resolves them itself with your credentials, so the value never leaves the platform. A file path or an environment variable is rejected.Build secrets require Docker Buildx for local builds, and a Dockerfile in either mode. Buildpack builds cannot consume secrets, so the build is rejected before it starts.
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: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.
On runners without a Docker daemon, swap --push for --remote and the image is built and pushed remotely instead:
Troubleshooting
Docker is not installed or the daemon is not running
Docker is not installed or the daemon is not running
Start Docker, or build without it:
The folder exceeds the 500 MB (or 20,000 entry) limit
The folder exceeds the 500 MB (or 20,000 entry) limit
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.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.--secret requires a Dockerfile build
--secret requires a Dockerfile build
Buildpack builds have no secret mechanism, so the option is rejected before the build starts. Add a Dockerfile to the build context, or drop
--secret.Build secrets require Docker Buildx
Build secrets require Docker Buildx
Local builds mount secrets through Buildx, which is not installed. Install the plugin as shown above, or build remotely with
--remote.The mounted secret is empty
The mounted secret is empty
The
id in --secret id=<id> and the id in RUN --mount=type=secret,id=<id> must match. When they do not, BuildKit mounts nothing and the build continues silently. Add required=true to the mount so the build fails at that step instead.secret "..." is a dictionary secret, so name the field you need
secret "..." is a dictionary secret, so name the field you need
A structured secret holds several fields, so the reference must select one:The message lists the fields the secret carries. An opaque secret needs no field, since it holds a single value.
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
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