Skip to content

Commit

Permalink
Use a chromeless image to add lighthouse
Browse files Browse the repository at this point in the history
  • Loading branch information
jaymoulin committed Nov 9, 2017
1 parent 4f3db9a commit e8f7366
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
FROM bitnami/minideb
FROM femtopixel/google-chrome-headless

MAINTAINER Jay MOULIN <[email protected]> <http://twitter.com/moulinjay>

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
Expand Down

0 comments on commit e8f7366

Please sign in to comment.