Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

510
Visualizações
How do I install a specific version of Chrome in a Dockerfile?

Have a Dockerfile that installs from a python image and then I need it to install a specific (not latest) version of Google Chrome.

Here's what I have:

FROM python:3.6

# Tools
RUN apt-get update \
    && apt-get install -y vim less \
    && apt-get clean

# https://github.com/SeleniumHQ/docker-selenium/blob/master/NodeChrome/Dockerfile.txt
#============================================
# Google Chrome
#============================================
# can specify versions by CHROME_VERSION;
#  e.g. google-chrome-stable=53.0.2785.101-1
#       google-chrome-beta=53.0.2785.92-1
#       google-chrome-unstable=54.0.2840.14-1
#       latest (equivalent to google-chrome-stable)
#       google-chrome-beta  (pull latest beta)
#============================================
ARG CHROME_VERSION="google-chrome-stable"
RUN 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-chrome.list \
  && apt-get update -qqy \
  && apt-get -qqy install \
    ${CHROME_VERSION:-google-chrome-stable} \
  && rm /etc/apt/sources.list.d/google-chrome.list \
  && rm -rf /var/lib/apt/lists/* /var/cache/apt/*

The Chrome installation steps were taken from here (as seen in the comments) and even using the version in the example I get the error

E: Version '53.0.2785.101-1' for 'google-chrome-stable' was not found

Tried other versions from https://chromereleases.googleblog.com/ and nothing works.

Do you know of a different way to install a specific version or if I'm doing something wrong with these steps?

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

This took me a while to find, but you're installing from Google's repository and they only keep the latest versions of Google Chrome in their repositories. You could probably search for 3rd party repositories that have older versions of Chrome, but I personally wouldn't recommend that.

The current version is 75.0.3770.100-1 for google-chrome-stable at the time of this post. Will that not work for you?

Lastly, I directly copied your dockerfile and it worked for me with the latest build of google-chrome-stable installed on the image. How were you running docker?

Here was my process:

  1. Copied your docker file directly into ./Dockerfile
  2. docker build ./
  3. docker image ls
  4. Copied my image id (90206843f24e in my case)
  5. docker run --entrypoint "/bin/bash" -it 90206843f24e

You'll be dropped in a root shell on the docker image to "poke" around run google-chrome -version to verify the above version is installed

I hope this works for you. Good luck and keep us posted!

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda