duneci-runner-gc 564 Bytes
Newer Older
Ansgar Burchardt's avatar
Ansgar Burchardt committed
1 2 3 4 5 6
#! /bin/bash

# see https://gitlab.com/gitlab-org/gitlab-runner-docker-cleanup

set -e

Ansgar Burchardt's avatar
Ansgar Burchardt committed
7 8 9
docker stop gitlab-runner-docker-cleanup || :
docker rm -v gitlab-runner-docker-cleanup || :

Ansgar Burchardt's avatar
Ansgar Burchardt committed
10 11 12 13 14 15 16
docker run -d \
    -e LOW_FREE_SPACE=5G \
    -e EXPECTED_FREE_SPACE=20G \
    -e LOW_FREE_FILES_COUNT=1048576 \
    -e EXPECTED_FREE_FILES_COUNT=2097152 \
    -e DEFAULT_TTL=10m \
    -e USE_DF=1 \
Ansgar Burchardt's avatar
Ansgar Burchardt committed
17
    --read-only \
Ansgar Burchardt's avatar
Ansgar Burchardt committed
18 19 20 21
    --restart always \
    -v /var/run/docker.sock:/var/run/docker.sock \
    --name=gitlab-runner-docker-cleanup \
    quay.io/gitlab/gitlab-runner-docker-cleanup