Install Docker on your MacOS Apple Silicon M1 arm64 machine.
Pull a Docker image that supports Puppeteer and is compatible with the arm64 architecture. You can use the official Node.js Docker image with arm64 support:
docker pull node:16-alpine3.14
# Start with the official Node.js Docker image with arm64 support
FROM node:16-alpine3.14
# Set the working directory to /app
WORKDIR /app
# Copy the package.json and package-lock.json files to /app
COPY package*.json ./
# Install the dependencies
RUN npm install
# Copy the rest of the files to /app
COPY . .
# Expose port 3000 for the Puppeteer server
EXPOSE 3000
# Set the command to start the Puppeteer server
CMD [ "npm", "start" ]
docker build -t my-puppeteer-app .
docker run -p 3000:3000 my-puppeteer-app
This will start the Puppeteer server inside the Docker container and map port 3000 to port 3000 on your MacOS Apple Silicon M1 arm64 machine. You can access the Puppeteer server by opening a web browser and navigating to http://localhost:3000
.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2022-01-04 11:00:00 +0000
Seen: 10 times
Last updated: May 13 '21
Is it impossible to remove brew from MacOS Apple Silicon?
What is the method of obtaining the key and value using yq V4.x.x?
How can the Mac Extended display be restated in different words?
Does the Excel FIND function (case-sensitive) consider case?
How can a connection be established on a local network through Docker and Bridge?
What is the process for preserving all Docker images and transferring them to a different device?
How can GPU memory be shared among various Docker containers?