-
-
Save jnkwrych/c647d8653515dc676f7369507795b9d8 to your computer and use it in GitHub Desktop.
A simple Dockerfile to run Playwright on Digital Ocean App Platform (not production tested)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Put this file in the root folder of your node project | |
FROM node:20 | |
RUN apt-get update && apt-get upgrade -y | |
# Install Playwright with Dependencies and Chromium only | |
# This is where a normal Digital Ocean App Platform without Docker fails because you don't have root access | |
RUN npx -y playwright@1.43.0 install --with-deps chromium | |
# Set the working directory to /app | |
WORKDIR /app | |
# Bundle your app source inside the docker image | |
COPY . . | |
# Install all the dependencies | |
RUN npm ci | |
RUN npm run build | |
EXPOSE 8080 | |
CMD [ "npm", "run", "start" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment