|
|
@ -29,14 +29,12 @@ if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then
|
|
|
|
|
|
|
|
|
|
|
|
if [ -n "${RESTART_CI_DOCKER_BEFORE_RUN}" ] ; then
|
|
|
|
if [ -n "${RESTART_CI_DOCKER_BEFORE_RUN}" ] ; then
|
|
|
|
echo "Restart docker before run to stop and clear all containers started with --rm"
|
|
|
|
echo "Restart docker before run to stop and clear all containers started with --rm"
|
|
|
|
podman container stop --all # Similar to "systemctl restart docker"
|
|
|
|
podman container rm --force --all # Similar to "systemctl restart docker"
|
|
|
|
echo "Prune all dangling images"
|
|
|
|
echo "Prune all dangling images"
|
|
|
|
docker image prune --force
|
|
|
|
docker image prune --force
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
# shellcheck disable=SC2086
|
|
|
|
# shellcheck disable=SC2086
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CI_CONTAINER_ID=$(docker run --cap-add LINUX_IMMUTABLE $CI_CONTAINER_CAP --rm --interactive --detach --tty \
|
|
|
|
CI_CONTAINER_ID=$(docker run --cap-add LINUX_IMMUTABLE $CI_CONTAINER_CAP --rm --interactive --detach --tty \
|
|
|
|
--mount "type=bind,src=$BASE_READ_ONLY_DIR,dst=$BASE_READ_ONLY_DIR,readonly" \
|
|
|
|
--mount "type=bind,src=$BASE_READ_ONLY_DIR,dst=$BASE_READ_ONLY_DIR,readonly" \
|
|
|
|
--mount "type=volume,src=${CONTAINER_NAME}_ccache,dst=$CCACHE_DIR" \
|
|
|
|
--mount "type=volume,src=${CONTAINER_NAME}_ccache,dst=$CCACHE_DIR" \
|
|
|
|