Docker image with gitlab-ci-multi-runner, which can run ruby builds.
1.4K
Docker image with gitlab-ci-multi-runner, which can run ruby builds. It uses rbenv to manage ruby versions.
Example of Docker Compose file (docker-compose.yml)
vrunner:
image: busybox
volumes:
- /home/gitlab_ci_multi_runner/data
runner:
image: outcoldman/gitlab-ci-multi-runner-ruby:latest
volumes_from:
- vrunner
environment:
- CI_SERVER_URL=https://gitlabci.example.com
- RUNNER_TOKEN=YOUR_TOKEN_FROM_GITLABCI
restart: always
Replace CI_SERVER_URL and RUNNER_TOKEN.
Run it
docker-compose up -d
Or using docker command line
docker run -d --env "CI_SERVER_URL=https://gitlabci.example.com" \
--env "RUNNER_TOKEN=YOUR_TOKEN_FROM_GITLABCI" \
--restart="always" \
--name=ruby_runner \
outcoldman/gitlab-ci-multi-runner-ruby:latest
In your project add .gitlab-ci.yml
before_script:
- RBENV_VERSION=2.0.0-p645 rbenv install -s
- RBENV_VERSION=2.0.0-p645 rbenv exec gem install bundle
- RBENV_VERSION=2.0.0-p645 rbenv exec bundle install
build:
script:
- RBENV_VERSION=2.0.0-p645 rbenv ruby --version
tags:
- ruby
before_script will install required ruby version specified with RBENV_VERSION, install bundle and gems from your Gemfile.
build will invoke ruby and ask ruby version.
RBENV_VERSION you can use .ruby-version file.Content type
Image
Digest
sha256:eda3df359…
Size
231.7 MB
Last updated
over 9 years ago
docker pull outcoldman/gitlab-ci-multi-runner-ruby