From e8f7366fd1ccf046883d6e14b322d790aeeaff7a Mon Sep 17 00:00:00 2001 From: jmoulin Date: Thu, 9 Nov 2017 11:54:06 +0100 Subject: [PATCH] Use a chromeless image to add lighthouse --- Dockerfile | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index b655d0a..9ba147c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,25 +1,23 @@ -FROM bitnami/minideb +FROM femtopixel/google-chrome-headless MAINTAINER Jay MOULIN +USER root + # Install deps + add Chrome Stable + purge all the things RUN apt-get update && apt-get install -y apt-transport-https ca-certificates curl gnupg --no-install-recommends && \ curl -sSL https://deb.nodesource.com/setup_9.x | bash - && \ - curl -sSL https://dl.google.com/linux/linux_signing_key.pub | apt-key add - && \ - echo "deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list && \ - apt-get update && apt-get install -y google-chrome-stable nodejs --no-install-recommends && \ + apt-get update && apt-get install -y nodejs --no-install-recommends && \ npm --global install yarn && \ apt-get purge --auto-remove -y curl gnupg && \ rm -rf /var/lib/apt/lists/* && \ yarn global add lighthouse && \ - groupadd -r chrome && useradd -r -g chrome -G audio,video chrome && \ mkdir -p /home/chrome/reports && chown -R chrome:chrome /home/chrome # some place we can mount and view lighthouse reports VOLUME /home/chrome/reports WORKDIR /home/chrome/reports - COPY entrypoint.sh /usr/bin/entrypoint # Run Chrome non-privileged