From e939e93f65a23b72a865b83d577cc5dbe5a0d542 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Tue, 30 Aug 2022 10:18:29 +0200 Subject: [PATCH] add dockerfile and readme --- Dockerfile | 13 +++++++++++++ README.md | 16 ++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 Dockerfile create mode 100644 README.md 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 +```