commit e939e93f65a23b72a865b83d577cc5dbe5a0d542 Author: Simon Vieille Date: Tue Aug 30 10:18:29 2022 +0200 add dockerfile and readme diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..4fae10d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM ubuntu:22.04 + +RUN apt-get update && apt-get install -y curl +RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs +RUN npm install -g playwright && npx playwright install-deps +RUN useradd -d /home/nodejs -m -s /usr/bin/bash -p `openssl rand -hex 32` nodejs +RUN mkdir /app && chown nodejs:nodejs /app +USER nodejs +RUN npx playwright install + +WORKDIR /app + +CMD ["node"] diff --git a/README.md b/README.md new file mode 100644 index 0000000..97308fb --- /dev/null +++ b/README.md @@ -0,0 +1,16 @@ +# deblan/playwright + +Docker image to run [playwright](https://github.com/microsoft/playwright). + +## Installation + +``` +docker pull deblan/playwright +``` + +## Usage + +``` +cd /path/to/project +docker run docker run -it -v $(pwd):/app --rm deblan/playwright npx playwright test +```