canasta image push

From canasta

canasta > image > push

canasta image push

Build and push a local image to the in-cluster registry

Synopsis

Build a Docker image from a local build context and push it to the in-cluster image registry of a Kubernetes host, printing the cluster-pullable reference (10.43.0.2:5000/<name>:<tag>).

Use the printed reference anywhere an instance takes an image: canasta config set CANASTA_IMAGE=... for a custom web image, canasta config set CANASTA_ELASTICSEARCH_IMAGE=... for a derived Elasticsearch image (e.g. with an analysis plugin), or a sidecar's image: in config/sidecars.yaml. Run canasta restart afterward if the config change did not already trigger one.

The build runs on the target host, which must be the cluster's control-plane node — the registry's push endpoint is a loopback-only hostPort there (the same assumption as canasta create --build-from). The build context path is resolved on that host. The registry is deployed automatically if it is missing.

Kubernetes only: on Docker Compose, a locally built tag is directly usable with no push.

canasta image push [flags] CONTEXT

Examples

canasta image push ./images/elasticsearch --name myapp-elasticsearch
canasta image push ~/es-icu --name es-icu -H prod1

Arguments

Argument Description Default Required Orchestrator
CONTEXT Docker build context directory on the target host (with --host, an absolute path or one starting with '~') Both

Flags

Flag Shorthand Description Default Required Orchestrator
--build-arg Build argument KEY=VALUE forwarded to the docker build (repeatable, e.g. --build-arg BASE_IMAGE=ghcr.io/canastawiki/canasta:latest for a web overlay Dockerfile that derives FROM ${BASE_IMAGE}) Both
--host -H Target host (a saved host name or user@hostname; default: localhost) Both
--name Image name, optionally name:tag (default tag: local). Repeated pushes to the same tag orphan the previous push's layers; run canasta image prune occasionally to reclaim them. Both

Global flags

Flag Shorthand Description Default Required Orchestrator
--help -h Show help message and exit Both
--verbose -v Enable verbose output Both