Skip to content

Commit

Permalink
Merge pull request #7 from juntossomosmais/fix/adapta-install-chrome
Browse files Browse the repository at this point in the history
feat: corrige install chrome
  • Loading branch information
lizarbventurim authored Oct 23, 2024
2 parents 4c3d3db + 2d2a4cb commit 5fa1609
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -16,12 +16,27 @@ RUN npm --version
RUN java -version

# Instalar o Google Chrome
USER root
RUN apt-get install -y wget
RUN wget -q -O - https://dl.google.com/linux/linux_signing_key.pub && \
echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google.list && \
apt-get update && \
apt-get install -y google-chrome-stable
# Definir variáveis de ambiente para evitar prompts interativos
ENV DEBIAN_FRONTEND=noninteractive

# Atualiza a lista de pacotes e instala dependências necessárias
RUN apt-get update && apt-get install -y \
wget \
gnupg \
ca-certificates

# Adiciona a chave GPG do Google Chrome e o repositório
RUN wget -q -O /usr/share/keyrings/google-chrome-keyring.gpg https://dl.google.com/linux/linux_signing_key.pub \
&& echo "deb [arch=amd64 signed-by=/usr/share/keyrings/google-chrome-keyring.gpg] http://dl.google.com/linux/chrome/deb/ stable main" | tee /etc/apt/sources.list.d/google-chrome.list

# Atualiza a lista de pacotes novamente e instala o Google Chrome
RUN apt-get update && apt-get install -y google-chrome-stable

# Limpeza para reduzir o tamanho da imagem
RUN apt-get clean && rm -rf /var/lib/apt/lists/*

# Definir o comando padrão para a imagem (opcional, depende do uso do Chrome)
CMD ["google-chrome", "--version"]

# Instalar dependências do Cypress

0 comments on commit 5fa1609

Please sign in to comment.