Skip to content
Branch: master
Go to file

Latest commit


Failed to load latest commit information.
Latest commit message
Commit time


dbuild is a docker based build system to facilitate linux package generation.

dbuild will:

  • Create a docker container for each platform specified.
  • Install specified dependencies using the platforms package manager.
  • Execute the user specified compilation and package generation script.
  • Populate the builds directory with an installation package for each platform specified.

dbuild will not:

  • Solve dependency hell.
  • Test resulting packages (yet)


  • Docker


dbuild should be installed globally with,

$ npm install dbuild -g

A typical dbuild directory structure is as follows,

    |-- source_dir
    |      |- source files
    |-- log_dir *
    |      |- build log files
    |-- builds_dir *
    |      |- built packages
    |-- dbuild.json

(*) log and builds directories will be created automatically if they do not already exist.

dbuild may be invoked from the project root to build for all specified platforms with,

$ dbuild

or for a specific platform (which is specified in dbuild.json)

$ dbuild -p ubuntu:17.10

or for all versions of the same platform (which are specified in dbuild.json)

$ dbuild -p ubuntu

or for multiple independent platforms,

$ dbuild -p ubuntu:17.10 -p centos:7


The dbuild.json specifies,

  • Package metadata
  • Which platforms to build packages for
  • The package dependencies (Note: name only, version is controlled by linux distribution)
  • The relative path to source, log, and builds directories

Use the sample dbuild.json to get started,

    "package":{"name":"myCode", "version":"0.0.1"},
        "apt":["ubuntu:17.10", "ubuntu:17.04", "ubuntu:16.04"],
        {"name":"build-essential", "ubuntu":"build-essential", "centos":"make glibc-devel gcc gcc-c++ patch rpm-build"}


Platforms are specified according to whether they are apt or yum based. Support for other platforms may be added in future (Create an issue if you require other platforms)

Platform names are given corresponding to those available on Docker Hub.


The dependencies array must give the name of a dependency at a minimum. If no other aliases are specified dbuild will attempt to install this dependency using this name. Package aliases may be specified either by package manager name, platform name, or platform name and version.

This script should compile the source code and create the output package. The following environment variables may be used,

Environment Variable Description
SOURCE_DIR Path to the source code directory
BUILDS_DIR Path to the builds directory
LOG_DIR Path to the log directory
PACKAGE_TYPE RPM or DEB depending on platform


This directory must be included and specified by the user.


Docker based build system for building linux packages




No releases published
You can’t perform that action at this time.