Debian + Docker
gbp-docker is an opinionated Debian build and development environment in a container.
Given a directory named ./src with a debian/ directory, build it with
docker run -it --rm -v "$(pwd):/mnt" -e UID=$(id -u) -e GID=$(id -g) opxhub/gbp:stretch bash -c 'cd src/; debuild'Launch a development container with
docker run -it --rm \
--name=${USER}-dbp-$(basename $(pwd)) \
--hostname=stretch \
-v "$(pwd):/mnt" \
-v "$HOME/.gitconfig:/etc/skel/.gitconfig:ro" \
-e UID=$(id -u) \
-e GID=$(id -g) \
-e EXTRA_SOURCES \
opxhub/gbp:stretch-devgit-buildpackage will use load $EXTRA_SOURCES for build dependencies if specified. Use the same format as /etc/apt/sources.list.
export EXTRA_SOURCES="
deb http://deb.openswitch.net/stretch stable opx opx-non-free
deb-src http://deb.openswitch.net/stretch stable opx"A script is provided which will pool packages into respective directories.
pool-packages opx-logging_2.1.1_amd64.changes
# also supports pooling every changes file found
pool-packages *.changesPackages will be found in ./pool/${DIST}-${ARCH}/src.
Generate the Dockerfiles from the templates and build the images.
make DIST=stretch
make DIST=buster
make DIST=xenial
make DIST=bionic