Skip to content

Latest commit

 

History

History
56 lines (40 loc) · 2.31 KB

README.md

File metadata and controls

56 lines (40 loc) · 2.31 KB

imgchroot

Quickly interact and customize a cloud image

Build Status Go Report Card Go Reference

Overview

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.

CLI

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

Chroot

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

Download

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.

Support

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