.\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . .TH "DEBOCKER" "8" "July 2015" "Debian" "debocker" . .SH "NAME" \fBdebocker\fR \- build Debian packages with docker . .SH "SYNOPSIS" \fBdebocker\fR [\fIOPTS\fR] \fBCOMMAND\fR [\fICOMMAND OPTS\fR] [ARGS] . .SH "DESCRIPTION" \fBDebocker\fR builds Debian packages inside docker\. The build process is contained in docker images and (almost) no other tools are needed to develop Debian packages on the main system\. Moreover, docker\'s image cache reuses the same system state whenever possible\. In particular, when a package is built for the second time, its dependecies and buildchain are not downloaded nor installed again\. . .P \fBDebocker\fR is also able to create a self\-contained \fIbundle\fR with everything necessary to build a package with docker only\. . .P You do not have to be root to run \fBdebocker\fR, but you have to be able to use docker(1) command\. In Debian, it means that you must be a member of the \fIdocker\fR group\. . .P The build process consists of 5 steps: . .IP "1." 4 \fIuprade\fR \- the base image is updated to the most recent packages (with apt\-get) . .IP "2." 4 \fIinstall\-utils\fR \- the Debian toolchain is installed . .IP "3." 4 \fIinstall\-deps\fR \- the build dependencies of the package are installed . .IP "4." 4 \fIextract\-source\fR \- the source package is extracted . .IP "5." 4 \fIbuild\fR \- the proper build is executed . .IP "" 0 . .SH "COMMANDS" Each command accepts \fB\-\-help\fR option that shows its basic CLI usage\. . .IP "\(bu" 4 \fBbundle\fR [\fBOPTS\fR] [\fBPATH\fR]: 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 \fIbundle\fR 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 using pristine\-tar(1)\. . .IP The bundle is independent from debocker and can be used with docker only (see \fIEXAMPLES\fR)\. . .IP Arguments: . .IP \fBPATH\fR: optional path to the package; defaults to the current directory . .IP Options: . .IP \fB\-o FILE\fR, \fB\-\-output FILE\fR: store bundle in \fBFILE\fR; the file is a traditional tarball with a Debian source package, a Dockerfile, and some utils . .IP \fB\-f FLAGS\fR, \fB\-\-flags FLAGS\fR: define builds flags that bundle will use; these are passed to dpkg\-buildpackage . .IP \fB\-\-from STEP\fR: invalidate \fBSTEP\fR causing docker to restart from this step, even if previous cache exists; possible values are: \fIbuild\fR, \fIextract\-source\fR, \fIinstall\-deps\fR, \fIinstall\-utils\fR, \fIupgrade\fR . .IP \fB\-\-image IMAGE\fR: define the base docker image to use; defaults to \fIdebian:unstable\fR . .IP "\(bu" 4 \fBbuild\-bundle\fR [\fBOPTS\fR] \fBBUNDLE\fR: Build a tarball file created with \fBbundle\fR by 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\. . .IP Arguments: . .IP \fBBUNDLE\fR: the location of a bundle to build . .IP Options: . .IP \fB\-o DIRECTORY\fR, \fB\-\-output DIRECTORY\fR: store the built files in \fBDIRECTORY\fR . .IP \fB\-s\fR, \fB\-\-sign\fR: sign the results of the build; this requires installed \fBdebsign\fR (see devscripts(1)) . .IP \fB\-\-no\-cache\fR: do not use docker\'s image cache (passed directly to \fIdocker build\fR); this effectively restarts the whole build from the start . .IP \fB\-\-pull\fR: pull the newest base image if available (passed directly to \fIdocker build\fR) . .IP "\(bu" 4 \fBbuild\fR [\fBOPTS\fR] [\fBPATH\fR]: Create a temporary bundle with \fBbundle\fR and build it with \fBbuild\-bundle\fR\. The respective options are passed unchanged to the subcommands (e\.g\., \fB\-s\fR can be used to sign packages)\. . .IP "" 0 . .SH "OPTIONS" . .TP \fB\-v\fR, \fB\-\-verbose\fR Make debocker\'s output verbose\. . .TP \fB\-\-help\fR Show summary of CLI usage\. . .P Global options must be given before the name of the command\. . .SH "FILES" There are no config files\. . .SH "EXAMPLES" Assuming that you are in a directory with a Debian source package: . .IP "" 4 . .nf $ debocker build . .fi . .IP "" 0 . .P 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 \fB\-\-from\fR option\. To rebuild the package, you may use: . .IP "" 4 . .nf $ debocker build \-\-from=build . .fi . .IP "" 0 . .P The \fBbuild\fR command is equivalent, save for the undeleted, intermediary file, with: . .IP "" 4 . .nf $ debocker bundle \-\-output /tmp/bundle\.tar $ debocker build\-bundle /tmp/bundle\.tar \-\-output \.\. . .fi . .IP "" 0 . .P You may pass custom flags to your build: . .IP "" 4 . .nf $ debocker build \-\-flags=\'\-j4\' . .fi . .IP "" 0 . .P To create a (pseudo)\-reproducible, compressed bundle with your package and to build it using docker: . .IP "" 4 . .nf $ debocker bundle \-\-output /tmp/bundle\.tar $ docker run \- < /tmp/bundle\.tar . .fi . .IP "" 0 . .SH "BUGS" Debocker does not clean after itself\. If you are not careful, docker images may consume a lot of space\. . .P And probably many more\. . .SH "AUTHOR" Initial idea and coding has been done by Tomasz Buchert \fItomasz@debian\.org\fR\. . .P Initial packaging, many ideas and a lot of support by Dariusz Dwornikowski\. . .P The semi\-official homepage is \fIhttp://debocker\.debian\.net\fR\. . .SH "SEE ALSO" pbuiler(8), docker(1), devscripts(1), pristine\-tar(1)