DEBOCKER(8)
β¨ NAME β¨
debocker β build Debian packages with docker. That's it, that's the whole vibe. It lives in section 8 of the manual, so it's the DEBOCKER(8) page, and it's iconic for anyone who's ever cried over a build chain. π«Ά
πΈ SYNOPSIS πΈ
debocker [OPTS] COMMAND [COMMAND OPTS] [ARGS]
π DESCRIPTION π
Okay so bestie, here's the tea: debocker builds Debian packages inside docker. The whole build process is contained in docker images, so (almost) no other tools are needed to develop Debian packages on your main system. No cap. And because docker's image cache reuses the same system state whenever possible, when a package gets built for the second time, its dependencies and buildchain are not downloaded nor installed again. The way that it just... remembers? Obsessed. π
Debocker can also create a self-contained bundle with everything necessary to build a package with docker only. One little file, all the power. π
You do not have to be root to run debocker, but you do have to be able to use docker(1) command. In Debian, that means you must be a member of the docker group. That's the entry fee, babes. π
The build process consists of 5 steps:
upradeβ the base image is updated to the most recent packages (withapt-get)install-utilsβ the Debian toolchain is installedinstall-depsβ the build dependencies of the package are installedextract-sourceβ the source package is extractedbuildβ the proper build is executed
π COMMANDS π
Every single command accepts a --help option that shows its basic CLI usage. Use it, fr fr, it's free. β¨
bundle [OPTS] [PATH]β Create a tarball file containing sources of a package in the current directory, and a series of scripts to build it using docker. The resulting bundle is stored in the parent directory as a tarball. If the package is non-native, the original tarball must be present in the parent directory. However, if the original tarball is not present, debocker will try to extract it usingpristine-tar(1). π§
The bundle is independent from debocker and can be used with docker only (see EXAMPLES). She's self-sufficient, she doesn't need you like that. π
Arguments:
PATHβ optional path to the package; defaults to the current directory
Options:
-o FILE,--output FILEβ store bundle inFILE; the file is a traditional tarball with a Debian source package, aDockerfile, and some utils-f FLAGS,--flags FLAGSβ define builds flags that bundle will use; these are passed todpkg-buildpackage--from STEPβ invalidateSTEPcausing docker to restart from this step, even if previous cache exists; possible values are:build,extract-source,install-deps,install-utils,upgrade--image IMAGEβ define the base docker image to use; defaults todebian:unstable
build-bundle [OPTS] BUNDLEβ Build a tarball file created withbundleby running the process in docker and extracting the final files to the current directory. This multi-step process takes advantage of docker's cache whenever possible, saving space and making successive builds very fast. π
Arguments:
BUNDLEβ the location of a bundle to build
Options:
-o DIRECTORY,--output DIRECTORYβ store the built files inDIRECTORY-s,--signβ sign the results of the build; this requires installeddebsign(seedevscripts(1))--no-cacheβ do not use docker's image cache (passed directly todocker build); this effectively restarts the whole build from the start--pullβ pull the newest base image if available (passed directly todocker build)
build [OPTS] [PATH]β Create a temporary bundle withbundleand build it withbuild-bundle. The respective options are passed unchanged to the subcommands (e.g.,-scan be used to sign packages). It's giving manager energy β she delegates, she doesn't do the work herself. π
π OPTIONS π
-v,--verboseβ Make debocker's output verbose. Spill everything, we want the details. π£οΈ--helpβ Show summary of CLI usage.
Global options must be given before the name of the command. Before, bestie. Order matters, don't test her. β οΈ
π FILES π
There are no config files. Nothing to edit, nothing to break, nothing to commit by accident. Lowkey a blessing. π
β EXAMPLES β
Assuming that you are in a directory with a Debian source package:
$ debocker build
will build the package in Debian unstable (the built files will be stored in the parent directory). If the build was successful, every subsequent run should use cache instead. You may force rebuild at any stage by using --from option. To rebuild the package, you may use:
$ debocker build --from=build
The build command is equivalent, save for the undeleted, intermediary file, with:
$ debocker bundle --output /tmp/bundle.tar
$ debocker build-bundle /tmp/bundle.tar --output ..
You may pass custom flags to your build:
$ debocker build --flags='-j4'
To create a (pseudo)-reproducible, compressed bundle with your package and to build it using docker:
$ debocker bundle --output /tmp/bundle.tar
$ docker run - < /tmp/bundle.tar
π BUGS π
Debocker does not clean after itself. If you are not careful, docker images may consume a lot of space. Not me leaving a little mess everywhere I go. π
And probably many more.
Be careful out there. She's messy and she knows it. π«
π AUTHOR π
Initial idea and coding has been done by Tomasz Buchert tomasz@debian.org.
Initial packaging, many ideas and a lot of support by Dariusz Dwornikowski.
The semi-official homepage is http://debocker.debian.net. Go say hi. πΈ
π¦ SEE ALSO π¦
pbuiler(8), docker(1), devscripts(1), pristine-tar(1)
And that's the whole page, bestie β this one comes to you from Debian, dated July 2015, section 8, and yeah, the date is giving vintage but the energy is timeless. Study it, slay it, build those packages. πβ¨ππ«Ά
π¦ where this page comes from
- debian bookworm: debocker 0.2.5 Β· GPL-3.0-or-later
- debian trixie: debocker 0.2.6 Β· GPL-3.0-or-later
- ubuntu jammy: debocker 0.2.4 Β· GPL-3.0-or-later
- ubuntu noble: debocker 0.2.5 Β· GPL-3.0-or-later
- ubuntu questing: debocker 0.2.6
- ubuntu resolute: debocker 0.2.6build1 Β· GPL-3.0-or-later
- ubuntu stonking: debocker 0.2.6build1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms