Sign inSign up

hearthmates/dockselpy

By hearthmates

•Updated over 3 years ago

Container for running Selenium tasks using Python and the latest Chrome and Firefox drivers.

Image
Developer tools
1

6.9K

hearthmates/dockselpy repository overview

⁠dockselpy

The image is built with the following dependencies:

  • latest Chrome and chromedriver
  • latest Firefox and geckodriver
  • Selenium
  • Python 3
  • Xvfb and the python wrapper - pyvirtualdisplay
⁠Running:
  • docker

    docker build -t selenium_docker .
    docker run --privileged -p 4000:4000 -d -it selenium_docker 
    
  • docker-compose

    docker-compose stop && docker-compose build && docker-compose up -d
    
⁠Example
from pyvirtualdisplay import Display
from selenium import webdriver

display = Display(visible=0, size=(800, 600))
display.start()

browser = webdriver.Firefox()
browser.get('https://www.google.com/')
print(browser.title)

browser.quit()
display.stop()

Detailed examples on how to use Firefox with custom profile or Google Chrome with desired options can be found in the source on Github.

Tag summary

Content type

Image

Digest

sha256:8eed8891e…

Size

590.9 MB

Last updated

over 3 years ago

docker pull hearthmates/dockselpy