Coder Social home page Coder Social logo

kenaco / dbuilder Goto Github PK

View Code? Open in Web Editor NEW

This project forked from seznam/dbuilder

0.0 2.0 0.0 23 KB

Docker images for building packages with clean dependencies in multiple distributions.

License: GNU Lesser General Public License v3.0

Python 89.56% Shell 9.49% Makefile 0.95%

dbuilder's Introduction

dbuilder

Docker images for building packages with clean dependencies in multiple distributions.

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
  • Postinstall hooks - It is possible to add hooks, after build package. Use volume /dbuilder/postinstall.d and drop executable files in. All executable files from this folder will be executed in order determined by numeric sort.
cp 00-post-builder.sh 10-post-script.py ./preinstall.d/
chmod +x ./postinstall.d/*
docker run --rm \
    -v `pwd`/postinstall.d:/dbuilder/postinstall.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.
    • BUILD_PACKAGES_FILE_PATH - [default="../"]

For maintaners

Prepare

./generate_dockerfiles.py

Build

make -C dockerfiles/ build

Push

make -C dockerfiles/ push

Generating dockerfiles

$ ./generate_dockerfiles.py -h
Usage: generate_dockerfiles.py [options]

Options:
  -h, --help            show this help message and exit
  -c CONFIGURATION_FILE, --configuration-file=CONFIGURATION_FILE
                        Configuration file path [config.yaml]
  -o OUTPUT_DIR, --output-dir=OUTPUT_DIR
                        Output directory [./dockerfiles/]
  -t TAG_SEPARATOR, --tag-separator=TAG_SEPARATOR
                        Separator of a docker image name and tags which will
                        used to separate output docker image names[_]

All relative paths in configuration file are taken to dirname(configuration file).

dbuilder's People

Contributors

dohnto avatar gizmoguy avatar tnozicka avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.