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 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259
|
<!DOCTYPE html>
<html>
<head>
<meta http-equiv='content-type' value='text/html;charset=utf8'>
<meta name='generator' value='Ronn/v0.7.3 (http://github.com/rtomayko/ronn/tree/0.7.3)'>
<title>debocker(8) - build Debian packages with docker</title>
<style type='text/css' media='all'>
/* style: man */
body#manpage {margin:0}
.mp {max-width:100ex;padding:0 9ex 1ex 4ex}
.mp p,.mp pre,.mp ul,.mp ol,.mp dl {margin:0 0 20px 0}
.mp h2 {margin:10px 0 0 0}
.mp > p,.mp > pre,.mp > ul,.mp > ol,.mp > dl {margin-left:8ex}
.mp h3 {margin:0 0 0 4ex}
.mp dt {margin:0;clear:left}
.mp dt.flush {float:left;width:8ex}
.mp dd {margin:0 0 0 9ex}
.mp h1,.mp h2,.mp h3,.mp h4 {clear:left}
.mp pre {margin-bottom:20px}
.mp pre+h2,.mp pre+h3 {margin-top:22px}
.mp h2+pre,.mp h3+pre {margin-top:5px}
.mp img {display:block;margin:auto}
.mp h1.man-title {display:none}
.mp,.mp code,.mp pre,.mp tt,.mp kbd,.mp samp,.mp h3,.mp h4 {font-family:monospace;font-size:14px;line-height:1.42857142857143}
.mp h2 {font-size:16px;line-height:1.25}
.mp h1 {font-size:20px;line-height:2}
.mp {text-align:justify;background:#fff}
.mp,.mp code,.mp pre,.mp pre code,.mp tt,.mp kbd,.mp samp {color:#131211}
.mp h1,.mp h2,.mp h3,.mp h4 {color:#030201}
.mp u {text-decoration:underline}
.mp code,.mp strong,.mp b {font-weight:bold;color:#131211}
.mp em,.mp var {font-style:italic;color:#232221;text-decoration:none}
.mp a,.mp a:link,.mp a:hover,.mp a code,.mp a pre,.mp a tt,.mp a kbd,.mp a samp {color:#0000ff}
.mp b.man-ref {font-weight:normal;color:#434241}
.mp pre {padding:0 4ex}
.mp pre code {font-weight:normal;color:#434241}
.mp h2+pre,h3+pre {padding-left:0}
ol.man-decor,ol.man-decor li {margin:3px 0 10px 0;padding:0;float:left;width:33%;list-style-type:none;text-transform:uppercase;color:#999;letter-spacing:1px}
ol.man-decor {width:100%}
ol.man-decor li.tl {text-align:left}
ol.man-decor li.tc {text-align:center;letter-spacing:4px}
ol.man-decor li.tr {text-align:right;float:right}
</style>
</head>
<!--
The following styles are deprecated and will be removed at some point:
div#man, div#man ol.man, div#man ol.head, div#man ol.man.
The .man-page, .man-decor, .man-head, .man-foot, .man-title, and
.man-navigation should be used instead.
-->
<body id='manpage'>
<div class='mp' id='man'>
<div class='man-navigation' style='display:none'>
<a href="#NAME">NAME</a>
<a href="#SYNOPSIS">SYNOPSIS</a>
<a href="#DESCRIPTION">DESCRIPTION</a>
<a href="#COMMANDS">COMMANDS</a>
<a href="#OPTIONS">OPTIONS</a>
<a href="#FILES">FILES</a>
<a href="#EXAMPLES">EXAMPLES</a>
<a href="#BUGS">BUGS</a>
<a href="#AUTHOR">AUTHOR</a>
<a href="#SEE-ALSO">SEE ALSO</a>
</div>
<ol class='man-decor man-head man head'>
<li class='tl'>debocker(8)</li>
<li class='tc'>debocker</li>
<li class='tr'>debocker(8)</li>
</ol>
<h2 id="NAME">NAME</h2>
<p class="man-name">
<code>debocker</code> - <span class="man-whatis">build Debian packages with docker</span>
</p>
<h2 id="SYNOPSIS">SYNOPSIS</h2>
<p><code>debocker</code> [<var>OPTS</var>] <code>COMMAND</code> [<var>COMMAND OPTS</var>] [ARGS]</p>
<h2 id="DESCRIPTION">DESCRIPTION</h2>
<p><strong>Debocker</strong> 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>
<p><strong>Debocker</strong> is also able to create a self-contained <em>bundle</em> with
everything necessary to build a package with docker only.</p>
<p>You do not have to be root to run <strong>debocker</strong>, but you have to be
able to use <span class="man-ref">docker<span class="s">(1)</span></span> command. In Debian, it means that you must be a
member of the <em>docker</em> group.</p>
<p>The build process consists of 5 steps:</p>
<ol>
<li> <em>uprade</em> - the base image is updated to the most recent
packages (with apt-get)</li>
<li> <em>install-utils</em> - the Debian toolchain is installed</li>
<li> <em>install-deps</em> - the build dependencies of the package are
installed</li>
<li> <em>extract-source</em> - the source package is extracted</li>
<li> <em>build</em> - the proper build is executed</li>
</ol>
<h2 id="COMMANDS">COMMANDS</h2>
<p>Each command accepts <code>--help</code> option that shows its basic CLI usage.</p>
<ul>
<li><p><code>bundle</code> [<code>OPTS</code>] [<code>PATH</code>]: 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 <em>bundle</em> 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 <span class="man-ref">pristine-tar<span class="s">(1)</span></span>.</p>
<p>The bundle is independent from debocker and can be used with
docker only (see <a href="#EXAMPLES" title="EXAMPLES" data-bare-link="true">EXAMPLES</a>).</p>
<p>Arguments:</p>
<p><code>PATH</code>: optional path to the package; defaults to the current
directory</p>
<p>Options:</p>
<p><code>-o FILE</code>, <code>--output FILE</code>: store bundle in <code>FILE</code>; the file is a
traditional tarball with a Debian source package, a Dockerfile,
and some utils</p>
<p><code>-f FLAGS</code>, <code>--flags FLAGS</code>: define builds flags that bundle will
use; these are passed to dpkg-buildpackage</p>
<p><code>--from STEP</code>: invalidate <code>STEP</code> causing docker to restart from
this step, even if previous cache exists; possible values are:
<em>build</em>, <em>extract-source</em>, <em>install-deps</em>, <em>install-utils</em>,
<em>upgrade</em></p>
<p><code>--image IMAGE</code>: define the base docker image to use; defaults to
<em>debian:unstable</em></p></li>
<li><p><code>build-bundle</code> [<code>OPTS</code>] <code>BUNDLE</code>: Build a tarball file created
with <code>bundle</code> 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.</p>
<p>Arguments:</p>
<p><code>BUNDLE</code>: the location of a bundle to build</p>
<p>Options:</p>
<p><code>-o DIRECTORY</code>, <code>--output DIRECTORY</code>: store the built files in
<code>DIRECTORY</code></p>
<p><code>-s</code>, <code>--sign</code>: sign the results of the build; this requires
installed <strong>debsign</strong> (see <span class="man-ref">devscripts<span class="s">(1)</span></span>)</p>
<p><code>--no-cache</code>: do not use docker's image cache (passed directly to
<em>docker build</em>); this effectively restarts the whole build from
the start</p>
<p><code>--pull</code>: pull the newest base image if available (passed directly
to <em>docker build</em>)</p></li>
<li><p><code>build</code> [<code>OPTS</code>] [<code>PATH</code>]: Create a temporary bundle with <code>bundle</code>
and build it with <code>build-bundle</code>. The respective options are
passed unchanged to the subcommands (e.g., <code>-s</code> can be used to
sign packages).</p></li>
</ul>
<h2 id="OPTIONS">OPTIONS</h2>
<dl>
<dt><code>-v</code>, <code>--verbose</code></dt><dd><p>Make debocker's output verbose.</p></dd>
<dt class="flush"><code>--help</code></dt><dd><p>Show summary of CLI usage.</p></dd>
</dl>
<p>Global options must be given before the name of the command.</p>
<h2 id="FILES">FILES</h2>
<p>There are no config files.</p>
<h2 id="EXAMPLES">EXAMPLES</h2>
<p>Assuming that you are in a directory with a Debian source package:</p>
<pre><code>$ debocker build
</code></pre>
<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 <code>--from</code> option. To rebuild the package,
you may use:</p>
<pre><code>$ debocker build --from=build
</code></pre>
<p>The <code>build</code> command is equivalent, save for the undeleted,
intermediary file, with:</p>
<pre><code>$ debocker bundle --output /tmp/bundle.tar
$ debocker build-bundle /tmp/bundle.tar --output ..
</code></pre>
<p>You may pass custom flags to your build:</p>
<pre><code>$ debocker build --flags='-j4'
</code></pre>
<p>To create a (pseudo)-reproducible, compressed bundle with your package
and to build it using docker:</p>
<pre><code>$ debocker bundle --output /tmp/bundle.tar
$ docker run - < /tmp/bundle.tar
</code></pre>
<h2 id="BUGS">BUGS</h2>
<p>Debocker does not clean after itself. If you are not careful, docker
images may consume a lot of space.</p>
<p>And probably many more.</p>
<h2 id="AUTHOR">AUTHOR</h2>
<p>Initial idea and coding has been done by Tomasz Buchert
<a href="mailto:tomasz@debian.org" data-bare-link="true">tomasz@debian.org</a>.</p>
<p>Initial packaging, many ideas and a lot of support by Dariusz
Dwornikowski.</p>
<p>The semi-official homepage is <a href="http://debocker.debian.net" data-bare-link="true">http://debocker.debian.net</a>.</p>
<h2 id="SEE-ALSO">SEE ALSO</h2>
<p><span class="man-ref">pbuiler<span class="s">(8)</span></span>, <span class="man-ref">docker<span class="s">(1)</span></span>, <span class="man-ref">devscripts<span class="s">(1)</span></span>, <span class="man-ref">pristine-tar<span class="s">(1)</span></span></p>
<ol class='man-decor man-foot man foot'>
<li class='tl'>Debian</li>
<li class='tc'>July 2015</li>
<li class='tr'>debocker(8)</li>
</ol>
</div>
</body>
</html>
|