Docker Pulls Docker Stars

Ruby 2.6.x, Chrome / Chrome driver, NodeJS on Docker for Capybara/Cucumber specs.

Based on official Ruby 2.x image and uses official stable Chrome repository. Uses X virtual framebuffer (Xvfb) for keycode conversions.

Can be used for Continuous Integration or Delivery (CI/CD) pipelines (like GitLab) instead of Qt and PhantomJS:

CI/CD Configuration

Example of GitLab CI configuration for Ruby on Rails project with Cucumber using the image (read

  stage: test
  image: 'nbulai/ruby-chromedriver:latest'
    RAILS_ENV: test
    - chromedriver -v # to check version
    - ...
    - bin/cucumber
      - coverage/
    - master

If you need some specific screen size for testing, then you can pass it as an SCREEN environment variable:

docker run -e SCREEN="1280x1024x16" -t -i --rm nbulai/ruby-chromedriver:latest bash

Don't forget to configure your Cucumber/Capybara to use Chrome as a driver (see instruction below).

First install it locally to run your test-suite (if you will run tests on the dev machine):

# add Google public key
wget -q -O - | apt-key add -
# add Google Chrome stable repository to sources
echo "deb stable main" >> /etc/apt/sources.list.d/google.list
sudo apt-get update 
# install Chrome and it's driver
sudo apt-get install google-chrome-stable chromium-chromedriver
sudo ln -s /usr/lib/chromium-browser/chromedriver /usr/bin/chromedriver
# check if all is OK
chromedriver -v

Add gem selenium-webdriver to your Gemfile:

group :test do
  # ...
  gem 'selenium-webdriver'

And then edit features/support/env.rb (or other config file):

# ...

Capybara.register_driver(:headless_chrome) do |app|
  capabilities =
    # Add 'no-sandbox' arg if you have an "unknown error: Chrome failed to start: exited abnormally"
    # @see
    chromeOptions: { args: %w[headless disable-gpu no-sandbox] } 
  ), browser: :chrome, desired_capabilities: capabilities)

Capybara.javascript_driver = :headless_chrome

# ...

That's all. Run bin/cucumber to check your tests.


This repo content is released under the MIT License.

Copyright (c) 2017-2020 Nikita Bulai (

Ruby Chromedriver

Ruby 2.x, Chrome / Chrome driver, NodeJS on Docker for Cucumber specs

Ruby Chromedriver Info

⭐ Stars 27
🔗 Source Code
🕒 Last Update a year ago
🕒 Created 4 years ago
🐞 Open Issues 0
➗ Star-Issue Ratio Infinity
😎 Author nbulaj