File tree Expand file tree Collapse file tree 6 files changed +55
-7
lines changed Expand file tree Collapse file tree 6 files changed +55
-7
lines changed Original file line number Diff line number Diff line change
1
+ .build
2
+ * .yaml
Original file line number Diff line number Diff line change 1
- FROM femtopixel/google-chrome-headless
1
+ FROM femtopixel/google-chrome-headless:0.2.0
2
2
3
3
MAINTAINER Jay MOULIN <jaymoulin@gmail.com> <http://twitter.com/moulinjay>
4
4
5
+ ARG ARM=0
5
6
USER root
6
7
7
8
# Install deps + add Chrome Stable + purge all the things
8
- RUN apt-get update && apt-get install -y apt-transport-https ca-certificates curl gnupg --no-install-recommends && \
9
- curl -sSL https://deb.nodesource.com/setup_9.x | bash - && \
9
+ RUN apt-get remove gnupg -y && apt-get install --reinstall gnupg2 dirmngr -y && \
10
+ if [ ${ARM-0} ]; then apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 40976EAF437D05B5; \
11
+ apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 3B4FE6ACC0B21F32; fi && \
12
+ rm -rf /var/lib/apt/lists/* && \
13
+ apt-get autoclean && apt-get update && apt-get install -y apt-transport-https ca-certificates curl gnupg --no-install-recommends && \
14
+ curl -sSL https://deb.nodesource.com/setup_9.x | bash - && \
10
15
apt-get update && apt-get install -y nodejs --no-install-recommends && \
16
+ if [ ${ARM-0} ]; then npm config set unsafe-perm true; fi && \
11
17
npm --global install yarn && \
12
18
apt-get purge --auto-remove -y curl gnupg && \
13
19
rm -rf /var/lib/apt/lists/* && \
14
- yarn global add lighthouse && \
20
+ npm install --global lighthouse && \
15
21
mkdir -p /home/chrome/reports && chown -R chrome:chrome /home/chrome
16
22
17
23
# some place we can mount and view lighthouse reports
Original file line number Diff line number Diff line change
1
+ CACHE ?= --no-cache=1
2
+ VERSION ?= 0.3.0
3
+ FULLVERSION ?= ${VERSION}
4
+ archs = arm32v7 amd64 i386
5
+ .PHONY : all build publish latest version
6
+ all : build publish
7
+ build :
8
+ $(foreach arch,$(archs ) , \
9
+ cat Dockerfile | sed " s/FROM femtopixel\/google-chrome-headless:0.2.0/FROM femtopixel\/google-chrome-headless:0.2.0-$( arch) /g" > .build; \
10
+ if [ $( arch) = arm32v7 ]; then \
11
+ docker build -t femtopixel/google-lighthouse:${VERSION} -$(arch ) --build-arg ARM=1 -f .build ${CACHE} . ; \
12
+ else \
13
+ docker build -t femtopixel/google-lighthouse:${VERSION} -$(arch ) --build-arg ARM=0 -f .build ${CACHE} . ; \
14
+ fi ; \
15
+ )
16
+ publish :
17
+ docker push femtopixel/google-lighthouse
18
+ cat manifest.yml | sed " s/\$ $VERSION /${VERSION} /g" > manifest2.yaml
19
+ cat manifest2.yaml | sed " s/\$ $FULLVERSION /${FULLVERSION} -debian/g" > manifest.yaml
20
+ manifest-tool push from-spec manifest.yaml
21
+ latest : build
22
+ cat manifest.yml | sed " s/\$ $VERSION /${VERSION} /g" > manifest2.yaml
23
+ cat manifest2.yaml | sed " s/\$ $FULLVERSION /latest/g" > manifest.yaml
24
+ manifest-tool push from-spec manifest.yaml
Original file line number Diff line number Diff line change @@ -7,8 +7,6 @@ Google Lighthouse - Docker Image
7
7
[ ![ Bitcoin donation] ( https://github.com/jaymoulin/jaymoulin.github.io/raw/master/btc.png " Bitcoin donation ")] ( https://m.freewallet.org/id/374ad82e/btc )
8
8
[ ![ Litecoin donation] ( https://github.com/jaymoulin/jaymoulin.github.io/raw/master/ltc.png " Litecoin donation ")] ( https://m.freewallet.org/id/374ad82e/ltc )
9
9
[ ![ PayPal donation] ( https://github.com/jaymoulin/jaymoulin.github.io/raw/master/ppl.png " PayPal donation ")] ( https://www.paypal.me/jaymoulin )
10
- [ ![ Beerpay donation] ( https://beerpay.io/femtopixel/docker-google-lighthouse/badge.svg " Beerpay donation ")] ( https://beerpay.io/femtopixel/docker-google-lighthouse )
11
-
12
10
13
11
[ Lighthouse] ( https://developers.google.com/web/tools/lighthouse/ ) analyzes web apps and web pages, collecting modern performance metrics and insights on developer best practices.
14
12
Original file line number Diff line number Diff line change 3
3
4
4
# first arg is `-f` or `--some-option`
5
5
if [ " ${1# http} " != " $1 " ]; then
6
- set -- lighthouse --chrome-flags=" --headless --disable-gpu" " $@ "
6
+ set -- lighthouse --enable-error-reporting -- chrome-flags=" --headless --disable-gpu" " $@ "
7
7
fi
8
8
9
9
exec " $@ "
Original file line number Diff line number Diff line change
1
+ image : femtopixel/google-lighthouse:$FULLVERSION
2
+ manifests :
3
+ -
4
+ image : femtopixel/google-lighthouse:$VERSION-arm32v7
5
+ platform :
6
+ architecture : arm
7
+ variant : v7
8
+ os : linux
9
+ -
10
+ image : femtopixel/google-lighthouse:$VERSION-i386
11
+ platform :
12
+ architecture : 386
13
+ os : linux
14
+ -
15
+ image : femtopixel/google-lighthouse:$VERSION-amd64
16
+ platform :
17
+ architecture : amd64
18
+ os : linux
You can’t perform that action at this time.
0 commit comments