Sign inSign up

seznam/dbuilder

By seznam

Updated about 10 years ago

Image for building distribution packages with clean dependencies.

Image
2

1.0K

seznam/dbuilder repository overview

Image for building distribution packages with clean dependencies for multiple distributions using Docker.

Usage

All images are available on docker hub https://hub.docker.com/r/seznam/dbuilder/.

The only thing you have to do is to choose a tag (generated from config.yaml) e.g. 'jessie_latest' and run: (Docker will automatically pull that image so you don't neet to build anything)

docker run --rm -v `pwd`:/dbuilder/sources seznam/dbuilder:debian_jessie

and *.deb will appear in your source directory

Optional arguments

  • Additional packages - It is possible to add additional packages to dbuilder and it will create local repository containing these files. Note the volume /dbuilder/additional_packages in the following example. Note, that this feature is implemented in apt-based dbuilder images only now.
# add some package
cp mypackage_1.0.9.8.2_amd64.deb ./deps/
# add another package, note that the deb package can be located
# in any subdirectory
mkdir ./deps/otherpackage_subdir/
cp otherpackage_0.22.4_all.deb ./deps/otherpackage_subdir/

# build and possibly use additional packages
docker run --rm \
    -v `pwd`/deps:/dbuilder/additional_packages \
    -v `pwd`/src:/dbuilder/sources \
    seznam/dbuilder:debian_jessie
  • Preinstall hooks - It is possible to add hooks, before dbuilder tries to satisfy build dependencies. Use volume /dbuilder/preinstall.d and drop executable files in. All executable files from this folder will be executed in order determined by numeric sort.
cp 00-my-fixer.sh 10-prepare-environment.py ./preinstall.d/
chmod +x ./preinstall.d/*
docker run --rm \
    -v `pwd`/preinstall.d:/dbuilder/preinstall.d \
    -v `pwd`/src:/dbuilder/sources \
    seznam/dbuilder:debian_jessie

Control environment variables

  • general

    • DBUILDER_SUBDIR - cd to subdir before building starts
    • NCPUS - concurrency
  • apt based:

    • DBUILDER_BUILD_CMD - [default="dpkg-buildpackage -j${NCPUS}"]
    • LOCAL_REPO_PRIORITY - sets Pin-Priority to local repository created using /dbuilder/additional_packages volume.

Tag summary

Content type

Image

Digest

sha256:0067e509d

Size

88.9 MB

Last updated

about 10 years ago

docker pull seznam/dbuilder:debian_latest