summaryrefslogtreecommitdiff
path: root/tools/ci/scripts/docker_run.sh
blob: 2fc292df8a5ec3b2078a3bd0c7bdec448d81196d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash -x

echo "IMAGE: ${IMAGE}"
echo "PACKAGES: ${PACKAGES}"
echo "COMMAND: ${COMMAND}"
echo "JOBS: ${JOBS}"

docker pull ${IMAGE} || exit 1
docker run \
    --volume=$(pwd):/build:rw \
    -e PACKAGES="${PACKAGES}" \
    -e COMMAND="${COMMAND}" \
    -e JOBS="${JOBS}" \
    ${IMAGE} \
    /bin/sh -x -c "cd /build; pwd; ./tools/ci/scripts/docker_incontainer.sh"