Browse Source

extra/travis-build: fallback to podman if docker is not available

Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
bboozzoo/fix-build-and-warnings
Maciek Borzecki 5 years ago
parent
commit
b04e6f4b3b
1 changed files with 8 additions and 4 deletions
  1. +8
    -4
      extra/travis-build

+ 8
- 4
extra/travis-build View File

@ -140,7 +140,7 @@ build() {
} }
build_in_container() { build_in_container() {
install_deps $1
install_deps "$1"
# distro specific quirks # distro specific quirks
case "$1" in case "$1" in
@ -172,12 +172,16 @@ spin_container() {
exit 1 exit 1
esac esac
engine="docker"
if ! command -v "$engine" 2>/dev/null ; then
engine="podman"
fi
# run a container, mount sources at /mnt, st # run a container, mount sources at /mnt, st
docker run --rm \
-v $PWD:/mnt \
"$engine" run --rm \
-v "$PWD":/mnt \
-w /mnt \ -w /mnt \
-e IN_CONTAINER=1 \ -e IN_CONTAINER=1 \
$DOCKER_IMG \
"$DOCKER_IMG" \
/mnt/extra/travis-build "$@" /mnt/extra/travis-build "$@"
} }


Loading…
Cancel
Save