common/travis/docker.sh: add control variables

for more flexible local testing using existing tools
This commit is contained in:
Robert Lowry 2019-09-26 11:19:54 -05:00 committed by Juan RP
parent b28342361d
commit e450363b00
2 changed files with 7 additions and 4 deletions

View file

@ -7,6 +7,7 @@ git:
env:
global:
- PATH=$PATH:/tmp/bin
- DOCKER_BASE=voidlinux/masterdir
- TAG=2019042701
matrix:

View file

@ -4,13 +4,15 @@
[ "$XLINT" ] && exit 0
/bin/echo -e "\x1b[32mPulling docker image for $BOOTSTRAP from $TAG...\x1b[0m"
docker pull voidlinux/masterdir-$BOOTSTRAP:$TAG
DOCKER_NAME=${DOCKER_NAME:-void}
/bin/echo -e "\x1b[32mPulling docker image $DOCKER_BASE-$BOOTSTRAP:$TAG...\x1b[0m"
docker pull $DOCKER_BASE-$BOOTSTRAP:$TAG
docker run -d \
--name void \
--name $DOCKER_NAME \
-v "$(pwd)":/hostrepo \
-v /tmp:/tmp \
-e XLINT="$XLINT" \
-e PATH="$PATH" \
voidlinux/masterdir-$BOOTSTRAP:$TAG \
$DOCKER_BASE-$BOOTSTRAP:$TAG \
/bin/sh -c 'sleep inf'