I got an error while building backend docker, specifically installing Puppeteer. I'm using M1 MacBook, and I found a solution on the local machine(https://github.com/puppeteer/puppeteer/issues/6622), but this didn't work on the docker. Has anyone who has the same Puppeteer issue on the docker?
#12 15.58 npm ERR! code 1
#12 15.58 npm ERR! path /app/node_modules/puppeteer
#12 15.58 npm ERR! command failed
#12 15.58 npm ERR! command sh -c node install.js
#12 15.58 npm ERR! The chromium binary is not available for arm64.
#12 15.58 npm ERR! If you are on Ubuntu, you can install with:
#12 15.58 npm ERR!
#12 15.58 npm ERR! sudo apt install chromium
#12 15.58 npm ERR!
#12 15.58 npm ERR!
#12 15.58 npm ERR! sudo apt install chromium-browser
#12 15.58 npm ERR!
#12 15.58 npm ERR! /app/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserFetcher.js:115
#12 15.58 npm ERR! throw new Error();
FROM --platform=linux/amd64 node:16-alpine
WORKDIR /app
EXPOSE 8000
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
ENV DOCKER_DEFAULT_PLATFORM "linux/amd64"
COPY . .
RUN apk --no-cache add --virtual builds-deps build-base python3 && \
npm install
CMD ["npm", "start"]