Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


Quickly interact and customize a cloud image

Build Status Go Report Card Go Reference


imgchroot is a Go-based CLI to quickly customize cloud images in a chroot without the need to boot the image or setup a user with credentials.

imgchroot mounts the image to a temporary directory, using the network block device (NBD) protocol. It then runs the required operation, such as a command, moving a file, or starts a shell in the chroot. Once the operation is complete the image is unmounted all without needing to boot the image itself.


Here are the primary functions available via the CLI:

  1. Chroot commands will run commands against the image inside a chroot. This includes command execution, via a shell, or push and pull files from the image.
  2. Download latest cloud images


imgchroot provides a number of different sub-commands to directly interact with a cloud image. Click to see the sub-command's CLI page for more details:

  • exec: run a command on the image
  • info: information about the image
  • pull: pull a file from the image
  • push: push a file to the image
  • run: transfer and run a file on the image
  • shell: start a shell on the image


imgchroot has the ability to find the latest cloud images as well. A user needs to provide the distro (e.g. ubuntu) and release (e.g. focal) to download. The the download will find the URL and download it.

See the download sub-command for more information.


If you find a bug, have a question, or ideas for improvements please file an issue on GitHub.