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

345
Visualizações
Chrome not captured when using karma with Docker

I am trying to run some karma tests using chrome in a Docker container. My Dockerfile looks like:

FROM node:6-alpine

RUN apk update \
  && apk add --update alpine-sdk \
  && apk add chromium \
  && npm install -g @angular/cli@1.0.0 \
  && ng set --global packageManager=yarn \
  && apk del alpine-sdk \
  && rm -rf /tmp/* /var/cache/apk/* *.tar.gz ~/.npm \
  && npm cache clear \
  && sed -i -e "s/bin\/ash/bin\/sh/" /etc/passwd

  ENV CHROME_BIN=/usr/local/bin/my-chrome-build

When I run ng test in this container (having mounted a project which I know works), I get:

$ ng test -sr && yarn run test:server
04 04 2017 10:32:27.896:INFO [karma]: Karma v1.5.0 server started at http://0.0.0.0:9876/
04 04 2017 10:32:27.915:INFO [launcher]: Launching browser Chrome with unlimited concurrency
04 04 2017 10:32:27.985:INFO [launcher]: Starting browser Chrome
04 04 2017 10:33:28.047:WARN [launcher]: Chrome have not captured in 60000 ms, killing.
04 04 2017 10:33:30.053:WARN [launcher]: Chrome was not killed in 2000 ms, sending SIGKILL.
04 04 2017 10:33:32.056:WARN [launcher]: Chrome was not killed by SIGKILL in 2000 ms, continuing.
error Command failed with exit code 1.

I don't really know how to debug this, any ideas what might be wrong or how I can find out more?

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

0

I'm using Chrome headless unstable in a Docker container with the following Karma browser config (excerpt):

...
browsers: ['Chrome_in_Docker'],
customLaunchers: {
  Chrome_in_Docker: {
    base: 'ChromeHeadless',
    flags: [
      '--disable-web-security',
      '--no-sandbox',
      '--disable-setuid-sandbox',
      '--disable-dev-shm-usage',
      '--remote-debugging-port=9223',
      '--headless',
      '--disable-gpu'
    ]
  }
},
...
about 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