Sign inSign up

ultrafunk/undetected-chromedriver

By ultrafunk

Updated over 3 years ago

official undetected-chromedriver image

Image
15

10K+

ultrafunk/undetected-chromedriver repository overview

undetected-chromedriver official docker image

has python, chrome, undetected-chromedriver, virtual display and some other tools

demo

this is a proof of concept, and highly untested.

tags

3.20-chrome108

also known as "latest" this is a complete image where all versions of chrome, python undetected-chromedriver are pinned at stable point.

3.20-chrome-lateinstall

this version has undetected-chromedriver 3.20, but installs chrome at image runtime, and so adapts automagically to coming chrome updates

usage

linux

docker run --rm -it -v $PWD/data:/data ultrafunk/undetected-chromedriver
# -v data is optional, not required to run

windows

docker run --rm -it -v c:/users/somepath:/data ultrafunk/undetected-chromedriver
# -v data is optional, not required to run

the above will by default run a demo, test against our https://nowsecure.nl domain, displays a screenshot in your terminal, and saves it as /data/nowsecure.png, then quit.

interactive interpreter
# tip!
docker run -it -v ${PWD}/data:/data ultrafunk/undetected-chromedriver ipython

# within ipython, you can load the demo script for inspiration by using 
%load /demo.py
run own scripts

linux

docker run --rm -it -v ${PWD}/data:/data ultrafunk/undetected-chromedriver ipython yourscript.py

windows

docker run --rm -it -v  c:/users/somepath:/data ultrafunk/undetected-chromedriver ipython yourscript.py
special stuff: RDP or VNC to a gui Desktop IN your container

you can rdp into your docker container. you will end up on a basic desktop. you can then open bash and ipython and code ahead (when running, you will see the actual chrome window) for non-windows clients, replace -p 3389:3389 by -p 5900:5900 and use vnc viewer.

docker run --rm -it -p 3389:3389 ultrafunk/undetected-chromedriver:latest bash

demo

usage in your own code

in docker, by default processes are run by root. to be able to run chrome, for tags below 106, it is therefore required to add the following extra options in your code :

import undetected_chromedriver as uc
options = uc.ChromeOptions()
options.arguments.extend(["--no-sandbox", "--disable-setuid-sandbox"])     # << this
driver = uc.Chrome(options)
usage in your own code: TAG 106 and higher
import undetected_chromedriver as uc
options = uc.ChromeOptions()

Tag summary

Content type

Image

Digest

sha256:d867b57e7

Size

670.1 MB

Last updated

over 3 years ago

docker pull ultrafunk/undetected-chromedriver