Docker에 Centos6 이미지로 Gitlab 설치하기와 발생했던 문제

Apr 23, 2017

Docker의 Centos6 이미지를 사용해서 Gitlab을 설치했다.

설치할 때 Gitlab 다운로드 페이지를 참고했다.

# 요구 패키지 설치
yum install curl openssh-server openssh-clients postfix cronie
service postfix start
chkconfig postfix on

# http, SSH 포트 열기. Docker라서 lokkit 사용 안 함.
# lokkit -s http -s ssh

# 다운로드, 설치
curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
sudo yum install gitlab-ce

# 설정 작업
sudo gitlab-ctl reconfigure

그런데 이런 에러가 발생했다.

Error executing action `run` on resource 'execute[load sysctl conf kernel.sem]'

docker를 실행할 때 privileged 옵션을 추가했다.

docker run \
    --detach=true \
    --privileged=true \
    --interactive=true  \
    --tty=true \
    --publish=80:80 \
    --volume=`pwd`:/myvol \
    --name=gitlab \
    kichul/gitlab

이번에는 ruby_block[supervise_redis_sleep] action run에서 멈추는 문제가 발생했다.

그래서 다음 서비스를 실행하고, 다시 reconfigure를 실행하니 잘 설치됐다.

/opt/gitlab/embedded/bin/runsvdir-start  &

http://localhost:80로 접속해서 초기 비밀번호를 지정했다. 초기 관리자 이메일 주소는 admin@example.com이었다.

See Also