$ docker run --name gitlab-postgresql -d \
--env 'DB_NAME=gitlabhq_production' \
--env 'DB_USER=gitlab' --env 'DB_PASS=password' \
--env 'DB_EXTENSION=pg_trgm' \
--volume /srv/docker/gitlab/postgresql:/var/lib/postgresql \
sameersbn/postgresql:9.6-2
$ docker run --name gitlab-redis -d \
--volume /srv/docker/gitlab/redis:/var/lib/redis \
sameersbn/redis:latest
$ docker run --name gitlab -d \
--link gitlab-postgresql:postgresql --link gitlab-redis:redisio \
--publish 10022:22 --publish 10080:80 \
--env 'GITLAB_PORT=10080' --env 'GITLAB_SSH_PORT=10022' \
--env 'GITLAB_SECRETS_DB_KEY_BASE=mGG3WNTrFB8LlqKhFWBgbTpgfwGlHdcq...' \
--env 'GITLAB_SECRETS_SECRET_KEY_BASE=9NzmG4KXLCWMStcdZRs2HVHllvkcMjthkZg2...' \
--env 'GITLAB_SECRETS_OTP_KEY_BASE=Jq6LmkfbdCC3QSPz7mXJJP55dS8qnrkw...' \
--env 'GITLAB_HOST=172.16.84.196' \
--env 'GITLAB_GRAVATAR_ENABLED=false' \
--volume /srv/docker/gitlab/gitlab:/home/git/data \
sameersbn/gitlab:10.5.1
下面运行 runner 容器并注册容器总是不成功,把 CI_SERVER_URL 改为
http://172.16.84.196:10080/ci 也不成功
$ docker run --name gitlab-ci-multi-runner -d --restart=always \
--volume /srv/docker/gitlab-runner:/home/gitlab_ci_multi_runner/data \
--link gitlab:gitlab \
--env='CI_SERVER_URL=http://gitlab/ci' \
--env='RUNNER_TOKEN=ypcnHH_cVy4Mxz_fAL48' \
--env='RUNNER_DESCRIPTION=myrunner' --env='RUNNER_EXECUTOR=shell' \
sameersbn/gitlab-ci-multi-runner
$ docker logs gitlab-ci-multi-runner
WARNING: Running in user-mode.
WARNING: The user-mode requires you to manually start builds processing:
WARNING: $ gitlab-runner run
WARNING: Use sudo for system-mode:
WARNING: $ sudo gitlab-runner...
ERROR: Registering runner... failed runner=ypcnHH_c status=404 Not Found
PANIC: Failed to register this runner. Perhaps you are having network problems