Skip to content

Is it possible to share the Dockerfile? #1071

Answered by noitsnotit
noitsnotit asked this question in Q&A
Discussion options

You must be logged in to vote

You can use this image for docker if you are running it on ec2. Lambda is slightly more tricky as its single process, you need to set some chromeoptions to make it work

from tempfile import mkdtemp

def handler(event=None, context=None):
    options = uc.ChromeOptions()
    options.binary_location = '/opt/chrome/chrome' # make sure you provide the path where you download the chrome 
    options.add_argument('--headless')
    options.add_argument('--no-sandbox')
    options.add_argument("--disable-gpu")
    options.add_argument("--window-size=1280x1696")
    options.add_argument("--single-process")
    options.add_argument("--disable-dev-shm-usage")
    options.add_argument("--disable-dev-…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@noitsnotit
Comment options

Answer selected by noitsnotit
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants