Open steren opened 2 years ago
I have the same error if I docker build
the image myself from the Dockerfile
I have the same issue when running lighthouse in docker compose on Azure DevOps pipeline.
services:
lhci:
depends_on:
- frontend
user: "${UID}:${GID}"
container_name: lighthouse-ci
build:
context: .
shm_size: 2g
volumes:
- "./lhci-data:/home/lhci/reports/.lighthouseci"
cap_add:
- ALL
command: lhci collect --no-sandbox
The Dockerfile is a bit modified file from here
FROM node:16-bullseye-slim
# Install utilities
RUN apt-get update --fix-missing && apt-get -y upgrade && apt-get install -y git wget gnupg && apt-get clean
# Install latest chrome stable package.
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
RUN sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
RUN apt-get update \
&& apt-get install -y google-chrome-stable --no-install-recommends \
&& apt-get clean
# Install npm dependencies.
RUN npm install -g @lhci/cli@0.9.0
RUN npm install -g lighthouse
RUN npm install -g puppeteer
# Setup a user to avoid doing everything as root
RUN groupadd --system lhci && \
useradd --system --create-home --gid lhci lhci && \
mkdir --parents /home/lhci/reports && \
chown --recursive lhci:lhci /home/lhci
RUN mkdir -p /home/lhci/reports
COPY lighthouserc.js puppeteerScript.js /home/lhci/reports/
USER lhci
WORKDIR /home/lhci/reports
CMD [ "lhci", 'autorun' ]
The crash happens randomly, with no particular reason. Sometimes it passes, sometimes it throws an EACCES
error.
Seems that docker does not have permission to mount local directory. Try to open the permission of lhci-data directory.
I am trying to follow the Docker client docs.
On google Cloud Shell or GitHub Codespaces, I run:
I get this error: