Skip to content

bhatti image share

bhatti image share server only

Section titled “bhatti image share ”

Share an image with one or more specific users.

bhatti image share <image-name> --user <name> [--user <name>]...
bhatti image share <image-name> --list

Adds an entry to the image-share table for each <user> so that user can reference the image with --image <name> from their sandbox creation calls. Sharing is per-user; there’s no “public” or “everyone” mode.

The command operates directly on the server’s SQLite database — it isn’t an HTTP API call. You must run it on the server, with access to /var/lib/bhatti/state.db (typically as sudo).

--list prints the users an image is currently shared with. --unshare is its own command, bhatti image unshare.

Terminal window
# Share with two users
sudo bhatti image share spc-golden --user kowshik --user sumo
shared "spc-golden" with: kowshik, sumo
Terminal window
# Inspect current shares
sudo bhatti image share spc-golden --list
spc-golden shared with: kowshik, sumo
Terminal window
# Image not yet shared
sudo bhatti image share spc-golden --list
spc-golden: not shared
FlagDefaultDescription
--user <name>User to share with. Repeatable. Required unless --list.
--listfalsePrint current shares for the image instead of adding new ones.

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

  • Image not found: bhatti can’t see your image because of name typos or because it’s owned by a different user. Check with bhatti image list.
  • User not found: the <name> doesn’t match any user. Check with bhatti user list.
  • No --user: the command refuses to do anything without an explicit user list (or --list). There’s no global “share with all” mode.