docker run --rm -it \
-v "$(pwd):/mnt" \
-e DIST=stretch \
-e ARCH=amd64 \
-e UID=$(id -u) \
-e GID=$(id -g) \
opxhub/gbp buildpackage src/Build artifacts are found in pool/${DIST}-${ARCH}/src/.
This alias may help with the long command. Environment variables should be set beforehand.
alias dbp='docker run --rm -it -v "$(pwd):/mnt" -e DIST -e ARCH -e EXTRA_SOURCES -e UID=$(id -u) -e GID=$(id -g) opxhub/gbp buildpackage'Usage:
DIST=stretch ARCH=amd64 dbp src/This example uses the alias from the previous step.
$ export EXTRA_SOURCES="
deb http://deb.openswitch.net/stretch unstable opx opx-non-free
deb-src http://deb.openswitch.net/stretch unstable opx
"
$ DIST=stretch ARCH=amd64 dbp src/