Skip to content

Instantly share code, notes, and snippets.

@Faq
Last active September 20, 2024 15:16
Show Gist options
  • Save Faq/8821c5fd18dd01da4f80d7435158096d to your computer and use it in GitHub Desktop.
Save Faq/8821c5fd18dd01da4f80d7435158096d to your computer and use it in GitHub Desktop.

Revisions

  1. Faq revised this gist Jun 8, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@ Source: https://gist.github.com/varyonic/dea40abcf3dd891d204ef235c6e8dd79

    Change log:
    1. replaced "dl-ssl.google.com" with "dl.google.com" according https://www.google.com/linuxrepositories/
    2. Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
    2. replaced "apt-key" as "Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8))."
    3. use https


  2. Faq revised this gist Jun 8, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    Source: https://gist.github.com/varyonic/dea40abcf3dd891d204ef235c6e8dd79

    Change log:
    1. replaced "dl-ssl.google.com" with "dl-ssl.google.com" according https://www.google.com/linuxrepositories/
    1. replaced "dl-ssl.google.com" with "dl.google.com" according https://www.google.com/linuxrepositories/
    2. Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
    3. use https

  3. Faq revised this gist Jun 8, 2022. 1 changed file with 12 additions and 4 deletions.
    16 changes: 12 additions & 4 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -1,19 +1,27 @@
    Source: https://gist.github.com/varyonic/dea40abcf3dd891d204ef235c6e8dd79

    Change log:
    1. replaced "dl-ssl.google.com" with "dl-ssl.google.com" according https://www.google.com/linuxrepositories/
    2. Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
    3. use https


    Oneliner for Dockerfile:
    RUN set -ex; \
    apt-get update; \
    apt-get install -y gnupg wget curl unzip --no-install-recommends; \
    wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | apt-key add -; \
    echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list; \
    wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | \
    gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/google.gpg --import; \
    chmod 644 /etc/apt/trusted.gpg.d/google.gpg; \
    echo "deb https://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list; \
    apt-get update -y; \
    apt-get install -y google-chrome-stable; \
    CHROME_VERSION=$(google-chrome --product-version | grep -o "[^\.]*\.[^\.]*\.[^\.]*"); \
    CHROMEDRIVER_VERSION=$(curl -s "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_$CHROME_VERSION"); \
    wget -q --continue -P /chromedriver "http://chromedriver.storage.googleapis.com/$CHROMEDRIVER_VERSION/chromedriver_linux64.zip"; \
    wget -q --continue -P /chromedriver "https://chromedriver.storage.googleapis.com/$CHROMEDRIVER_VERSION/chromedriver_linux64.zip"; \
    unzip /chromedriver/chromedriver* -d /usr/local/bin/

    # To check it after (chrome and chromedriver versions will be the same):
    $ docker run --rm -it put_docker_image_name_here bash
    $ google-chrome --version
    $ chromedriver -v
    $ chromedriver -v
  4. Faq revised this gist Jun 8, 2022. 1 changed file with 10 additions and 9 deletions.
    19 changes: 10 additions & 9 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -1,15 +1,16 @@
    Source: https://gist.github.com/varyonic/dea40abcf3dd891d204ef235c6e8dd79

    Oneliner for Dockerfile:
    RUN apt-get update && \
    apt-get install -y gnupg wget curl unzip --no-install-recommends && \
    wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
    echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list && \
    apt-get update -y && \
    apt-get install -y google-chrome-stable && \
    CHROME_VERSION=$(google-chrome --product-version | grep -o "[^\.]*\.[^\.]*\.[^\.]*") && \
    CHROMEDRIVER_VERSION=$(curl -s "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_$CHROME_VERSION") && \
    wget -q --continue -P /chromedriver "http://chromedriver.storage.googleapis.com/$CHROMEDRIVER_VERSION/chromedriver_linux64.zip" && \
    RUN set -ex; \
    apt-get update; \
    apt-get install -y gnupg wget curl unzip --no-install-recommends; \
    wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | apt-key add -; \
    echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list; \
    apt-get update -y; \
    apt-get install -y google-chrome-stable; \
    CHROME_VERSION=$(google-chrome --product-version | grep -o "[^\.]*\.[^\.]*\.[^\.]*"); \
    CHROMEDRIVER_VERSION=$(curl -s "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_$CHROME_VERSION"); \
    wget -q --continue -P /chromedriver "http://chromedriver.storage.googleapis.com/$CHROMEDRIVER_VERSION/chromedriver_linux64.zip"; \
    unzip /chromedriver/chromedriver* -d /usr/local/bin/

    # To check it after (chrome and chromedriver versions will be the same):
  5. Faq created this gist Jun 7, 2022.
    18 changes: 18 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    Source: https://gist.github.com/varyonic/dea40abcf3dd891d204ef235c6e8dd79

    Oneliner for Dockerfile:
    RUN apt-get update && \
    apt-get install -y gnupg wget curl unzip --no-install-recommends && \
    wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
    echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list && \
    apt-get update -y && \
    apt-get install -y google-chrome-stable && \
    CHROME_VERSION=$(google-chrome --product-version | grep -o "[^\.]*\.[^\.]*\.[^\.]*") && \
    CHROMEDRIVER_VERSION=$(curl -s "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_$CHROME_VERSION") && \
    wget -q --continue -P /chromedriver "http://chromedriver.storage.googleapis.com/$CHROMEDRIVER_VERSION/chromedriver_linux64.zip" && \
    unzip /chromedriver/chromedriver* -d /usr/local/bin/

    # To check it after (chrome and chromedriver versions will be the same):
    $ docker run --rm -it put_docker_image_name_here bash
    $ google-chrome --version
    $ chromedriver -v