diff --git a/Dockerfile b/Dockerfile index 176842c..9a39e25 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,16 +1,18 @@ -FROM public.ecr.aws/lambda/python@sha256:7c0b6f5a3937f34b2ff0553898dce1a8711c3da6f789f6c4b495e54618a930e2 as build -RUN dnf install -y unzip && \ +FROM public.ecr.aws/lambda/python@sha256:7c0b6f5a3937f34b2ff0553898dce1a8711c3da6f789f6c4b495e54618a930e2 AS build +RUN dnf install -y --nodocs unzip && \ curl -Lo "/tmp/chromedriver-linux64.zip" "https://storage.googleapis.com/chrome-for-testing-public/139.0.7258.66/linux64/chromedriver-linux64.zip" && \ curl -Lo "/tmp/chrome-linux64.zip" "https://storage.googleapis.com/chrome-for-testing-public/139.0.7258.66/linux64/chrome-linux64.zip" && \ unzip /tmp/chromedriver-linux64.zip -d /opt/ && \ unzip /tmp/chrome-linux64.zip -d /opt/ FROM public.ecr.aws/lambda/python@sha256:7c0b6f5a3937f34b2ff0553898dce1a8711c3da6f789f6c4b495e54618a930e2 -RUN dnf install -y atk cups-libs gtk3 libXcomposite alsa-lib \ +RUN dnf install -y --nodocs --setopt=install_weak_deps=0 \ + atk cups-libs gtk3 libXcomposite alsa-lib \ libXcursor libXdamage libXext libXi libXrandr libXScrnSaver \ libXtst pango at-spi2-atk libXt xorg-x11-server-Xvfb \ - xorg-x11-xauth dbus-glib dbus-glib-devel nss mesa-libgbm -RUN pip install selenium==4.34.2 + xorg-x11-xauth dbus-glib dbus-glib-devel nss mesa-libgbm && \ + dnf clean all && rm -rf /var/cache/dnf/* && \ + pip install --no-cache-dir -U selenium==4.34.2 COPY --from=build /opt/chrome-linux64 /opt/chrome COPY --from=build /opt/chromedriver-linux64 /opt/ COPY main.py ./