Skip to content
Branch: master
Find file Copy path
Find file Copy path
@ebidel ebidel Use Node 10 79bb83e Oct 6, 2018
2 contributors

Users who have contributed to this file

@ebidel @rishabhsrao
53 lines (38 sloc) 1.5 KB
FROM node:10-slim
LABEL maintainer="Eric Bidelman <ebidel@>"
# Install utilities
RUN apt-get update --fix-missing && apt-get -y upgrade
# Install latest chrome dev package.
RUN wget -q -O - | apt-key add - \
&& sh -c 'echo "deb [arch=amd64] stable main" >> /etc/apt/sources.list.d/google.list' \
&& apt-get update \
&& apt-get install -y google-chrome-unstable --no-install-recommends \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /src/*.deb
ADD /usr/local/bin/dumb-init
RUN chmod +x /usr/local/bin/dumb-init
# Download latest Lighthouse from npm.
# cache bust so we always get the latest version of LH when building the image.
RUN npm i lighthouse -g
# Install express.
COPY package.json .
RUN npm i --production
# Add the simple server.
COPY server.js /
RUN chmod +x /server.js
RUN chmod +x /
# Add a chrome user and setup home dir.
RUN groupadd --system chrome && \
useradd --system --create-home --gid chrome --groups audio,video chrome && \
mkdir --parents /home/chrome/reports && \
chown --recursive chrome:chrome /home/chrome
USER chrome
#VOLUME /home/chrome/reports
#WORKDIR /home/chrome/reports
# Disable Lighthouse error reporting to prevent prompt.
ENV CI=true
ENTRYPOINT ["dumb-init", "--", "/"]
#CMD ["lighthouse", "--help"]
You can’t perform that action at this time.