add dockerfile and readme
This commit is contained in:
commit
e939e93f65
13
Dockerfile
Normal file
13
Dockerfile
Normal file
|
@ -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"]
|
16
README.md
Normal file
16
README.md
Normal file
|
@ -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
|
||||||
|
```
|
Loading…
Reference in a new issue