CH-BUILD(1)

πŸ“¦ version 0.26, in ubuntu jammy

πŸ’… CH-BUILD(1) β€” the Charliecloud one, bestie

okay so. you found ch-build, a manual page from Charliecloud, and I'm gonna walk you through it like we're texting at 2am. grab a snack. πŸ“


✨ NAME ✨

ch-build β€” build an image and drop it into the builder's back-end storage. that's it, that's the whole job. πŸ’–


🌸 SYNOPSIS 🌸

$ ch-build [-b BUILDER] [--builder-info] -t TAG [ARGS ...] CONTEXT

that's the whole shape of it. one line, so many possibilities. main character energy fr fr. πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

WARNING: this script is deprecated in favor of using the desired builder directly; they've added some tips for Docker to the FAQ. It will be removed in the next release. so like… enjoy it while it lasts bestie, it's giving farewell tour. 😭

Okay so what it actually does: it builds an image named TAG described by a Dockerfile, and places the result into the builder's back-end storage. simple as that. ✨

and here's the thing β€” using this script is not required for a working Charliecloud image. nope! you can also use any builder that can produce a Linux filesystem tree directly, whether or not it's in the list below. but ch-build is the friend that hides the vagaries of making the supported builders work smoothly with Charliecloud, and it adds some conveniences (e.g., pass HTTP proxy environment variables to the build environment if the builder doesn't do this by default). she's doing the emotional labor for you. 🫢

Supported builders, unprivileged:

  • ch-image: our internal builder. the home team. πŸ’œ

Supported builders, privileged:

  • docker: Docker.

Experimental builders (i.e., the code is there but not tested much):

  • buildah: Buildah in "rootless" mode with no setuid helpers, using ch-run (via ch-run-oci) for RUN instructions. this mode is fully unprivileged. slay.
  • buildah-runc: Buildah in "rootless" mode with setuid helpers, using the default runc for RUN instructions.
  • buildah-setuid: Buildah in "rootless" mode with setuid helpers, using ch-run (via ch-run-oci) for RUN instructions.

Specifying the builder, in descending order of priority:

  • -b, --builder BUILDER β€” command line option. the loudest voice wins.
  • $CH_BUILDER β€” environment variable. whispering in the background.
  • Default β€” docker if Docker is installed; otherwise, ch-image.

Other arguments:

  • --builder-info β€” print the builder to be used and its version, then exit. like a little vibe check on your builder. πŸ‘€
  • -f, --file DOCKERFILE β€” Dockerfile to use (default: $CONTEXT/Dockerfile)
  • -t TAG β€” name (tag) of Docker image to build. the iconique one.
  • --help β€” print help and exit.
  • --version β€” print version and exit.

Additional arguments are accepted and passed unchanged to the underlying builder. no notes, no edits, straight through. πŸ’…


πŸ’€ BUGS πŸ’€

The tag suffix :latest is somewhat misleading, as by default neither ch-build nor bare builders will notice if the base FROM image has been updated. Use --pull to make sure you have the latest base image.

so :latest is out here lying to you a little bit. it's not toxic, it's just… not paying attention. use --pull, bestie. πŸ™ˆ

🌈 EXAMPLES 🌈

Create an image tagged foo and specified by the file Dockerfile located in the context directory. Use /bar as the Docker context directory. Use the default builder.

$ ch-build -t foo /bar

Equivalent to above:

$ ch-build -t foo --file=/bar/Dockerfile /bar

Instead, use /bar/Dockerfile.baz:

$ ch-build -t foo --file=/bar/Dockerfile.baz /bar

Equivalent to the first example, but use ch-image even if Docker is installed:

$ ch-build -b ch-image -t foo /bar

Equivalent to above:

$ export CH_BUILDER=ch-image
$ ch-build -t foo /bar

see how they're all the same girl in different outfits? obsessed. βœ¨πŸŽ€


πŸ› 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

like, tell them. they want to know. constructive criticism is self care. 🫢


πŸ‘‘ SEE ALSO πŸ‘‘


2014–2021, Triad National Security, LLC


and that's the whole page, bestie! brought to you by Charliecloud 0.26, dated 2022-01-30 10:06 UTC β€” mwah, go build something cute. πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from