Skip to content

Commit e8f7366

Browse files
committed
Use a chromeless image to add lighthouse
1 parent 4f3db9a commit e8f7366

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

Dockerfile

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,23 @@
1-
FROM bitnami/minideb
1+
FROM femtopixel/google-chrome-headless
22

33
MAINTAINER Jay MOULIN <jaymoulin@gmail.com> <http://twitter.com/moulinjay>
44

5+
USER root
6+
57
# Install deps + add Chrome Stable + purge all the things
68
RUN apt-get update && apt-get install -y apt-transport-https ca-certificates curl gnupg --no-install-recommends && \
79
curl -sSL https://deb.nodesource.com/setup_9.x | bash - && \
8-
curl -sSL https://dl.google.com/linux/linux_signing_key.pub | apt-key add - && \
9-
echo "deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list && \
10-
apt-get update && apt-get install -y google-chrome-stable nodejs --no-install-recommends && \
10+
apt-get update && apt-get install -y nodejs --no-install-recommends && \
1111
npm --global install yarn && \
1212
apt-get purge --auto-remove -y curl gnupg && \
1313
rm -rf /var/lib/apt/lists/* && \
1414
yarn global add lighthouse && \
15-
groupadd -r chrome && useradd -r -g chrome -G audio,video chrome && \
1615
mkdir -p /home/chrome/reports && chown -R chrome:chrome /home/chrome
1716

1817
# some place we can mount and view lighthouse reports
1918
VOLUME /home/chrome/reports
2019
WORKDIR /home/chrome/reports
2120

22-
2321
COPY entrypoint.sh /usr/bin/entrypoint
2422

2523
# Run Chrome non-privileged

0 commit comments

Comments
 (0)