CH-CONVERT(1)
๐ฆ NAME ๐ฆ
ch-convert โ like, glow-up your image from one format to another, bestie ๐
โจ SYNOPSIS โจ
$ ch-convert [-i FMT] [-o FMT] [OPTION ...] IN OUT
๐ DESCRIPTION ๐
okay so basically: copy image IN to OUT and convert its format while you're at it. If OUT is already there? It gets replaced, no hesitation โ unless you passed --no-clobber, in which case it's a hard no. ๐ซ
And lowkey important: it is an error if IN and OUT are the same format. Like, girl, just use that format's own tools for that, fr fr.
Here's the tea: ch-run can run container images that are plain directories, or (optionally) SquashFS archives. But images come in a whole variety of other formats too, and that's the whole point โ the main character energy of this tool is making images in those other formats available to ch-run. ๐
For best performance, ch-convert should be invoked only once, producing the final format you actually need. No extra passes, we keep it efficient. โจ
INโ Descriptor for the input image. For image builders, this is an image reference; otherwise, it's a filesystem path. ๐งOUTโ Descriptor for the output image. ๐ง
๐ the options (DESCRIPTION, part 2) ๐
-h,--helpโ Print help and exit. iconic behavior honestly.-i,--in-fmt FMTโ Input image format isFMT. If you omit it, it gets inferred, as described below. ๐-n,--dry-runโ Don't read the input or write the output. Super useful for testing format inference. no cap, a great way to vibe check your globs first.--no-clobberโ Error ifOUTalready exists, rather than replacing it. protective queen ๐ซถ--no-xattrsโ Ignore xattrs and ACLs when converting. Overrides$CH_XATTRS.-o,--out-fmt FMTโ Output image format isFMT; inferred if omitted.-q,--quietโ Be quieter; can be repeated. Incompatible with-v. See the FAQ entry on verbosity<#faq-verbosity>for details.-s,--storage DIRโ Set the storage directory. Equivalent to the same option forch-image(1)andch-run(1).--tmp DIRโ A sub-directory for temporary storage is created inDIRand removed at the end of a successful conversion. If this script crashes or errors out, the temporary directory is left behind to assist in debugging (it's giving crime scene, but helpful ๐). Storage may be needed up to twice the uncompressed size of the image, depending on the input and output formats. Default:$TMPDIRif specified; otherwise/var/tmp.-v,--verboseโ Print extra chatter. Can be repeated. yapper mode enabled ๐ฃ๏ธ--xattrsโ Preserve xattrs and ACLs when converting.
๐ IMAGE FORMATS ๐
ch-convert knows about these values of FMT:
ch-imageโ Internal storage for Charliecloud's unprivileged image builder (Dockerfile interpreter)ch-image.dirโ Ordinary filesystem directory (i.e., not a mount point) containing an unpacked image. Output directories that already exist are replaced if they look like an image. If the output directory is empty, the conversion should use the directory without overwriting it. If the directory doesn't look like an image and isn't empty, exit with an error. ๐จdockerโ Internal storage for Docker.podmanโ Internal storage for Podman.squashโ SquashFS filesystem archive containing the flattened image. SquashFS archives are much like tar archives but are mountable, including bych-run's internal SquashFUSE mounting. Most systems have at least the SquashFS-Tools installed which allows unpacking into a directory, just like tar. Due to this greater flexibility, SquashFS is preferred to tar. ๐
Note: Conversions to and from SquashFS are quite noisy due to the verbosity of the underlyingmksquashfs(1)andunsquashfs(1)tools. Not their fault, they're just chatty. ๐ญ
tarโ Tar archive containing the flattened image with no layer sub-archives; i.e., the output ofdocker exportworks but the output ofdocker savedoes not. Output tarballs are always gzipped and must end in.tar.gz; input tarballs can be any compression acceptable totar(1).
All of these are local formats; ch-convert does not know how to push or pull images. sorry bestie, no registry fairy dust here ๐ง
๐ฎ FORMAT INFERENCE ๐ฎ
ch-convert tries to save typing by guessing formats when they are reasonably clear. This is done against filenames, rather than file contents, so the rules are the same for output descriptors that don't yet exist. (manifesting your file into existence, basically โจ)
Format inference is done for both IN and OUT. The first matching glob below yields the inferred format. Paths need not exist in the filesystem.
*.sqfs,*.squash,*.squashfs: SquashFS.*.tar,*.t?z,*.tar.?,*.tar.??: Tarball./*,./*, i.e. absolute path or relative path with explicit dot: Directory.- If
ch-imageis installed:ch-imageinternal storage. - If Podman is installed: Podman internal storage.
- If Docker is installed: Docker internal storage.
- Otherwise: No format inference. ๐
๐ EXAMPLES ๐
Typical build-to-run sequence for image foo/bar using ch-run's internal SquashFUSE code, inferring the output format:
$ sudo docker build -t foo/bar -f Dockerfile .
[...]
$ ch-convert foo/bar:latest /var/tmp/foobar.sqfs
input: docker foo/bar:latest
output: squashfs /var/tmp/foobar.sqfs
copying ...
done
$ ch-run /var/tmp/foobar.sqfs -- echo hello
hello
Same conversion, but no format inference:
$ ch-convert -i ch-image -o squash foo/bar:latest /var/tmp/foobar.sqfs
input: docker foo/bar:latest
output: squashfs /var/tmp/foobar.sqfs
copying ...
done
๐ญ REPORTING BUGS ๐ญ
If Charliecloud was obtained from your Linux distribution, use your distribution's bug reporting procedures. (they handle it, not us, respectfully)
Otherwise, report bugs to: <https://github.com/hpc/charliecloud/issues>
๐ SEE ALSO ๐
Full documentation at: <<https://hpc.github.io/charliecloud>>
๐ Copyright ๐
contributors to the Charliecloud project, which has been established as "Charliecloud a Series of LF Projects, LLC". For web site terms of use, trademark policy, and related information, please see: https://lfprojects.org.
okay that's the whole page bestie, you ate ๐
this was version 0.44, dated 2026-05-31 07:53 UTC, and it's the CH-CONVERT(1) manual. go forth and convert, periodt ๐ฆโจ
๐ฆ where this page comes from
- ubuntu stonking: charliecloud-builders 0.44-1 ยท Apache-2.0-TNS
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms