1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199
|
.\" 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)
|