---
name: "ch-builder2tar"
section: "1"
platform: "linux"
package: "charliecloud-builders"
version: "0.21-1"
release: "Debian 11 (Bullseye)"
platforms: ["linux"]
url: "https://new.carta.tech/ch-builder2tar"
---

# ch-builder2tar(1)

Flatten a builder image into a Charliecloud image tarball

## NAME

ch-builder2tar - Flatten a builder image into a Charliecloud image tarball

## SYNOPSIS

```
$ ch-builder2tar [-b BUILDER] [--nocompress] IMAGE OUTDIR
```

## DESCRIPTION

Flatten the builder image tagged **IMAGE** into a Charliecloud tarball in directory **OUTDIR**.

The builder-specified environment (e.g., **ENV** statements) is placed in a file in the tarball at **$IMAGE/ch/environment**, in a form suitable for **ch-run --set-env**.

See **[ch-build(1)](/ch-build/1.md)** for details on specifying the builder.

Additional arguments:

- **-b, --builder BUILDER**

  Use specified builder; if not given, use **$CH\_BUILDER** or default.

- **--nocompress**

  Do not compress tarball.

- **--help**

  Print help and exit.

- **--version**

  Print version and exit.

## EXAMPLE

```
$ ch-builder2tar hello /var/tmp
57M /var/tmp/hello.tar.gz
$ ls -lh /var/tmp
-rw-r-----  1 reidpr reidpr  57M Feb 13 16:14 hello.tar.gz
```

## REPORTING BUGS

If Charliecloud was obtained from your Linux distribution, use your distribution’s bug reporting procedures.

Otherwise, report bugs to: \<*https://github.com/hpc/charliecloud/issues*\>

## SEE ALSO

[charliecloud(7)](/charliecloud/7.md)

Full documentation at: \<*https://hpc.github.io/charliecloud*\>

## COPYRIGHT

2014–2020, Triad National Security, LLC
