CONTAINER-BUILD(1)

πŸ“¦
this version Β· 5 versions
, in debian bookworm, ubuntu noble

✨ NAME ✨

container-build β€” build a container, bestie πŸ’…


🌸 SYNOPSIS 🌸

container build ['OPTIONS']
cnt b ['OPTIONS']

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so the container build command does exactly what it says on the tin: it builds a container, and it does it based on a script. that's the whole vibe, no cap πŸ”₯

πŸŽ€ Scripts πŸŽ€

here's the lineup of build scripts you can pick from, queen's choice:

  • debootstrap β€” the basic script for building a Debian based container. see container-build-debootstrap(1) for the deets πŸ“
  • debconf β€” the advanced script that automatically builds a Debian based container. see container-build-debconf(1) πŸ’–
  • default β€” a symlink (if it exists) pointing at whichever build script gets used when you didn't specify one. on Debian based systems you can manage it with update-alternatives(1), i.e. sudo update-alternatives --config container_build-script. very main character of it ✨

πŸ’… OPTIONS πŸ’…

here are all the container build options, and yes we're going through every single one, periodt:

  • -n, --name='NAME' β€” tell it what to call the container. name your baby 🫢
  • -c, --capability='CAPABILITY' β€” the capabilities you wanna grant, see capabilities(7).
  • -d, --drop-capability='DROP_CAPABILITY' β€” the capabilities you wanna drop, see capabilities(7). bye bye πŸ‘‹
  • -s, --script='SCRIPT' β€” pick your container build script. defaults to debootstrap.
  • -v, --verbose β€” spill the tea on what's being done, literally narrate it πŸ“’
  • -b, --bind='DIRECTORY:DIRECTORY[:OPTIONS][;DIRECTORY:DIRECTORY[:OPTIONS]]' β€” container read-write bind mounts, see the systemd-nspawn(1) --bind option.
  • --bind-ro='DIRECTORY:DIRECTORY[:OPTIONS][;DIRECTORY:DIRECTORY[:OPTIONS]]' β€” container read-only bind mounts, see the systemd-nspawn(1) --bind-ro option. look but don't touch πŸ”’
  • --cnt-overlay='DIRECTORY_LOWER:DIRECTORY_UPPER:DIRECTORY_WORK:DIRECTORY_MERGED[;DIRECTORY_UPPER:DIRECTORY_LOWER:DIRECTORY_WORK:DIRECTORY_MERGED]' β€” container overlay mounts, see Documentation/filesystems/overlayfs.txt. layers on layers 🧚
  • --cnt.overlay-options='OPTION1,OPTION2[;OPTION3,OPTION4]' β€” container overlay mount options, see Documentation/filesystems/overlayfs.txt.
  • --cnt.start='OPTION1[,OPTION2,...]' β€” container start options, see container-start(1). set it up and send it 🌈

πŸ”₯ EXAMPLES πŸ”₯

build an example.net container using the debootstrap script:

sudo container build -n example.net -s debootstrap

build an example.net container using the debconf script:

sudo container build -n example.net -s debconf

build an example.net container with the default build script and start it:

sudo container build,start -n example.net

ate. no crumbs πŸ’–


πŸ‘‘ SEE ALSO πŸ‘‘


🌐 HOMEPAGE 🌐

more info about compute-tools and the Open Infrastructure project lives on the homepage at https://open-infrastructure.net πŸ¦‹


πŸ’Œ CONTACT πŸ’Œ

bug reports, feature requests, help, patches, support and everything else are welcome on the Open Infrastructure Software Mailing List <software@lists.open-infrastructure.net>.

Debian specific bugs can also be reported in the Debian Bug Tracking System at https://bugs.debian.org. go off, report that bug πŸ›


πŸ’œ AUTHORS πŸ’œ

compute-tools were written by Daniel Baumann <daniel.baumann@open-infrastructure.net> and others. icons only, fr fr ⭐


and that's the whole page, bestie πŸŽ€ this is container-build(1) from compute-tools, brought to you by Open Infrastructure β€” go build something iconic with it πŸ’…βœ¨

πŸ“¦ where this page comes from