LoginSignup
0
0

More than 5 years have passed since last update.

chrome,chromedriverインストールのItamaeレシピ

Posted at

VPS上のUbuntuでheadlessのchromeを使うためのインストールレシピ

chrome_recipe.rb
package 'gdebi'
execute 'install chrome' do
  deb_name = 'google-chrome-stable_current_amd64.deb'
  commands = [
      'cd /tmp',
      "wget https://dl.google.com/linux/direct/#{deb_name}",
      "gdebi --n ./#{deb_name}"
  ]
  command commands.join(' && ')
  not_if 'command -v google-chrome'
end

execute 'install chromedriver' do
  commands = [
      'cd /tmp',
      'wget https://chromedriver.storage.googleapis.com/2.44/chromedriver_linux64.zip',
      'unzip chromedriver_linux64.zip -d /usr/local/bin'
  ]
  command commands.join(' && ')
  not_if 'command -v chromedriver'
end

gist

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0