This needs : dockerhost
git clone https://github.com/ariadata/dc-gitlab-runner.git && cd dc-gitlab-runner && rm -rf .git
docker-compose up -d
docker exec -it gitlab-runner bash
gitlab-runner register
Fill the requested information
Note sample : for tags you can use
docker,linux,ubuntu
(for shared addshared
too!)Note sample : for executor enter
docker
Note sample : for default docker image enter
ubuntu:latest
gitlab-runner restart
docker system prune -af
Or you can set cron for do this for example once per day at midnight by :
crontab -l | { cat; echo "0 0 * * * docker system prune -af >/dev/null 2>&1"; } | crontab -
sudo systemctl restart cron
sudo nano config/config.toml
docker exec -it gitlab-runner gitlab-runner restart
Done!