The image web-automation is based on gschaetz/base-ubuntu and provides a comprehensive environment for web scraping and browser automation tasks. The image contains the following:
/opt/chrome/chrome (symlinked to /usr/local/bin/chrome and /usr/local/bin/chromium)/usr/local/bin/chromedriver (with symlink at /usr/bin/chromedriver)The image is built for the following architecture:
Note: ARM64 is not supported because Chrome for Testing doesn't provide linux-arm64 builds. The image can still run on ARM64 hosts (e.g., Apple Silicon) using Docker's platform emulation with --platform linux/amd64.
Use like you would any other base image:
FROM gschaetz/web-automation:latest
The following environment variables are pre-configured:
CHROME_BIN=/usr/local/bin/chrome - Path to Chrome binaryCHROMIUM_BIN=/usr/local/bin/chromium - Path to Chromium binary (same as chrome)DISPLAY=:99 - Display setting for headless operationfrom selenium import webdriver
from selenium.webdriver.chrome.options import Options
options = Options()
options.add_argument('--headless')
options.add_argument('--no-sandbox')
options.add_argument('--disable-dev-shm-usage')
# ChromeDriver will automatically use /usr/bin/chromium via CHROME_BIN env var
driver = webdriver.Chrome(options=options)
driver.get('https://example.com')
print(driver.title)
driver.quit()
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.chrome.service import Service
options = Options()
options.binary_location = '/usr/local/bin/chrome' # or '/usr/local/bin/chromium'
options.add_argument('--headless')
options.add_argument('--no-sandbox')
options.add_argument('--disable-dev-shm-usage')
service = Service('/usr/local/bin/chromedriver')
driver = webdriver.Chrome(service=service, options=options)
driver.get('https://example.com')
print(driver.title)
driver.quit()
My contributions are under MIT License
As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, Python, Chromium, Google Chrome, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).
As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.
Content type
Image
Digest
sha256:75b0e3956…
Size
583.1 MB
Last updated
about 1 month ago
docker pull gschaetz/web-automation