Versions Compared

Key

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

...

  • --privileged : 해당 권한을 추가하지 않으면 --volume 옵션에 명시된 디렉토리와 관련하여 권한 오류가 발생할 수 있습니다.

gitlab-runner

환경 변수 설정

Code Block
export GITLAB_RUNNER_HOME=/srv/gitlab-runner

 

인증서 복사

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

 

Container 생성

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