Last active
December 15, 2020 16:50
-
-
Save peterkowalski/db168838abe31cbe904e0b15945a7e40 to your computer and use it in GitHub Desktop.
[Install, register and run gitlab-runner in docker] Basic workflow with GitLab Docker Runner #docker #gitlab
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. Install | |
docker volume create gitlab-runner-config | |
docker run -d --name gitlab-runner --restart always \ | |
-v /var/run/docker.sock:/var/run/docker.sock \ | |
-v gitlab-runner-config:/etc/gitlab-runner \ | |
gitlab/gitlab-runner:latest | |
# 2. Register | |
docker run --rm -it -v gitlab-runner-config:/etc/gitlab-runner gitlab/gitlab-runner:latest register | |
# 3. Test locally | |
docker run --rm -it \ | |
-v $PWD:$PWD \ | |
-v /var/run/docker.sock:/var/run/docker.sock \ | |
-v gitlab-runner-config:/etc/gitlab-runner \ | |
--workdir $PWD \ | |
gitlab/gitlab-runner:latest exec docker $STAGE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment