-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use a chromeless image to add lighthouse
- Loading branch information
Showing
1 changed file
with
4 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|