通过docker-compose安装
version: '3'
services:
runner:
image: 'gitlab/gitlab-runner:latest'
container_name: gitlab-runner
restart: always
volumes:
- ./conf:/etc/gitlab-runner
- ./data/gitlab-running-docker.sock:/var/run/docker.sock
- ${SOURCE_DIR}:/home/www/:rw
- ${DEPLOY_SH}:/home/deploy.sh:ro
- ${DEPLOY_PROJECTS}:/home/projects/:rw
networks:
backend:
driver: bridge