Skip to content

bhatti image import

Import an image from a local Docker daemon, or directly from a tarball without Docker.

bhatti image import <docker-ref> [--name <string>]
bhatti image import --tar <path> --name <string>

Two modes:

Docker mode (default). The CLI runs docker save <ref> on your machine and streams the resulting tarball to the bhatti server, which converts it to an ext4 rootfs. Requires Docker installed locally. The image must already be in your local Docker daemon — pull it first with docker pull if needed.

Tarball mode (--tar). Skip Docker entirely. The CLI reads the file at <path> and streams it to the server. The tarball must be in the format produced by docker save (an OCI layout or v1 image manifest). --name is required in this mode since there’s no ref to derive the name from.

If you don’t pass --name in Docker mode, a name is derived from the ref the same way as image pull: python:3.12python-3.12.

For private registries, this is the recommended path — docker pull handles authentication on your machine using your existing Docker credentials, then bhatti just receives the bytes:

Terminal window
docker pull ghcr.io/org/private:latest
bhatti image import ghcr.io/org/private:latest
Terminal window
# Import from local Docker (name derived from ref)
bhatti image import python:3.12
Terminal window
# Private image: pull with Docker first, then import
docker pull ghcr.io/org/private:latest
bhatti image import ghcr.io/org/private:latest
Terminal window
# Locally-built image
docker build -t my-env .
bhatti image import my-env
Terminal window
# Custom name override
bhatti image import python:3.12 --name py312
Terminal window
# Raw tarball — no Docker needed
docker save ubuntu:24.04 -o /tmp/ubuntu.tar
bhatti image import --tar /tmp/ubuntu.tar --name ubuntu-24
  • Docker not found: install Docker, or use --tar with a tarball.
  • Image not in local Docker: docker pull <ref> first, or use --tar with a saved tarball.
  • Server rejects the upload: image is too large or malformed; check stderr for the server message.
FlagDefaultDescription
--name <string>derived from ref (Docker mode); required (--tar mode)Image name to register on the server.
--tar <path>Skip Docker; stream the given tarball directly.

See Global flags for --url, --token, --json, --timing, --data-dir.