Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
mkdir -p $GITLAB_RUNNER_HOME/config/certs
cp gitlab.examplecentos.com.crt $GITLAB_RUNNER_HOME/config/certs

Container 생성

Code Block
docker run -d --name gitlab-runner --restart always \
   --network hostv /etc/hosts:/etc/hosts \
   -v /var/run/docker.sock:/var/run/docker.sock \
   -v /srv/gitlab-runner/$GITLAB_RUNNER_HOME/config:/etc/gitlab-runner \
  -v /srv/gitlab-runner/certs:/etc/gitlab-runner/certs \
  gitlab/gitlab-runner:latest

결과

Code Block
languagebash
root@hanum:~/ssl_dir# docker exec -it gitlab-runner bash
root@hanum:/# gitlab-runner register
Runtime platform                                    arch=amd64 os=linux pid=22 revision=a998cacd version=13.2.2
Running in system-mode.

Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com/):
https://gitlab.example.com/
Please enter the gitlab-ci token for this runner:
qCr66hfn2yZisZ_76F6C
Please enter the gitlab-ci description for this runner:
[hanum]: shell
Please enter the gitlab-ci tags for this runner (comma separated):
shell
Registering runner... succeeded                     runner=qCr66hfn
Please enter the executor: docker, docker-ssh, parallels, virtualbox, docker+machine, docker-ssh+machine, custom, ssh, kubernetes, shell:
shell
Runner registered successfully. Feel free to start it, but if it's running already the config should be automatically reloaded!