aboutsummaryrefslogtreecommitdiff
path: root/ci/test/04_install.sh
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-03-25 11:14:35 +0100
committerMarcoFalke <falke.marco@gmail.com>2021-04-09 15:56:23 +0200
commitfa278412a023ac150da764a465567f2970348449 (patch)
tree03613d5c76c98f6419b618ce2dabc17dcaa792ae /ci/test/04_install.sh
parentfad4f48e0763d111369656dea9575a789d2016e8 (diff)
downloadbitcoin-fa278412a023ac150da764a465567f2970348449.tar.xz
ci: Restart docker before run
Also, add setting for persistent worker in .cirrus.yml
Diffstat (limited to 'ci/test/04_install.sh')
-rwxr-xr-xci/test/04_install.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/ci/test/04_install.sh b/ci/test/04_install.sh
index f0ed314d19..608acfc2cf 100755
--- a/ci/test/04_install.sh
+++ b/ci/test/04_install.sh
@@ -33,7 +33,12 @@ if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then
echo "Creating $DOCKER_NAME_TAG container to run in"
${CI_RETRY_EXE} docker pull "$DOCKER_NAME_TAG"
- DOCKER_ID=$(docker run $DOCKER_ADMIN -idt \
+ if [ -n "${RESTART_CI_DOCKER_BEFORE_RUN}" ] ; then
+ echo "Restart docker before run to stop and clear all containers started with --rm"
+ systemctl restart docker
+ fi
+
+ DOCKER_ID=$(docker run $DOCKER_ADMIN --rm --interactive --detach --tty \
--mount type=bind,src=$BASE_ROOT_DIR,dst=/ro_base,readonly \
--mount type=bind,src=$CCACHE_DIR,dst=$CCACHE_DIR \
--mount type=bind,src=$DEPENDS_DIR,dst=$DEPENDS_DIR \