forked from umihico/docker-selenium-lambda
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
14 lines (13 loc) · 743 Bytes
/
Dockerfile
File metadata and controls
14 lines (13 loc) · 743 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
FROM public.ecr.aws/lambda/python:3.8 as build
RUN yum install -y unzip && \
curl -SL https://chromedriver.storage.googleapis.com/2.37/chromedriver_linux64.zip > /tmp/chromedriver.zip && \
curl -SL https://github.com/adieuadieu/serverless-chrome/releases/download/v1.0.0-37/stable-headless-chromium-amazonlinux-2017-03.zip > /tmp/headless-chromium.zip && \
unzip /tmp/chromedriver.zip -d /opt/ && \
unzip /tmp/headless-chromium.zip -d /opt/
FROM public.ecr.aws/lambda/python:3.8
RUN yum install -y https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
RUN pip install selenium
COPY --from=build /opt/headless-chromium /opt/
COPY --from=build /opt/chromedriver /opt/
COPY test.py ./
CMD [ "test.handler" ]