Open fadilnatakusumah opened 2 years ago
here is my Dockerfile
FROM node:15.2.1 AS build
WORKDIR /app
ADD . /app
RUN apt-get update
# for https
RUN apt-get install -yyq ca-certificates
# install libraries
RUN apt-get install -yyq libappindicator1 libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libnss3 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6
# tools
RUN apt-get install -yyq gconf-service lsb-release wget xdg-utils
# and fonts
RUN apt-get install -yyq fonts-liberation
# and chromium
RUN apt-get install -yyq chromium
RUN yarn
RUN yarn build-staging
# STAGE-2
# Production image, copy all the files and run
FROM node:15.2.1-alpine
WORKDIR /app
COPY --chown=node:node --from=build /app /app
RUN yarn global add serve && chown -R node:node .
USER node
ENTRYPOINT ["serve"]
CMD ["-s","build"]
is any other workaround for this problem?
Hi @fadilnatakusumah, thanks for reporting this issue. I'll figure it out as soon as possible and push the fix/write the way to workaround.
HI @sPavl0v, I think the information on this page can help you fix this bug, please read the docker related part.
https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
Did you add --no-sandbox within the configuration? The error message states exactly that and it is also explained in your link https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md#setting-up-chrome-linux-sandbox
Hi, I try to use
react-spa-prerender
to build my static HTML files. it works, but when I use it with Docker, it would give me this erroralready using launchOptions config from the doc but still not working from me