From e4fc3a1b6f1115b75a82794ea0f7ef3fb9f25ed5 Mon Sep 17 00:00:00 2001 From: Dan Barber Date: Sat, 4 Feb 2023 23:18:22 -0600 Subject: [PATCH] Install ChromeDriver --- Dockerfile | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3e67078..23eaac0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,8 +8,17 @@ WORKDIR /app RUN apt-get update # Install Chrome -RUN wget -q https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -RUN apt-get -y install ./google-chrome-stable_current_amd64.deb +RUN wget -q https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \ + apt-get -y install ./google-chrome-stable_current_amd64.deb + +# Install ChromeDriver +RUN CHROMEDRIVER_VERSION=`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE` && \ + mkdir -p /opt/chromedriver-$CHROMEDRIVER_VERSION && \ + curl -sS -o /tmp/chromedriver_linux64.zip http://chromedriver.storage.googleapis.com/$CHROMEDRIVER_VERSION/chromedriver_linux64.zip && \ + unzip -qq /tmp/chromedriver_linux64.zip -d /opt/chromedriver-$CHROMEDRIVER_VERSION && \ + rm /tmp/chromedriver_linux64.zip && \ + chmod +x /opt/chromedriver-$CHROMEDRIVER_VERSION/chromedriver && \ + ln -fs /opt/chromedriver-$CHROMEDRIVER_VERSION/chromedriver /usr/local/bin/chromedriver # Install Rebar and Hex RUN mix local.rebar --force && mix local.hex --force