Adding a Docker image to have testcafe + docker-compose

This commit is contained in:
David Négrier 2021-12-03 18:20:32 +01:00
parent c89afba6cd
commit 0a3417e813
2 changed files with 10 additions and 3 deletions

View File

@ -1,12 +1,14 @@
version: "3"
services:
testcafe:
image: testcafe/testcafe:1.17.1
working_dir: /tests
build: tests/
working_dir: /project/tests
# Run as root to have the right to access /var/run/docker.sock
user: root
environment:
BROWSER: "chromium --use-fake-device-for-media-stream"
volumes:
- ./tests:/tests
- ./:/project
- ./maps:/maps
- /var/run/docker.sock:/var/run/docker.sock
# security_opt:

5
tests/Dockerfile Normal file
View File

@ -0,0 +1,5 @@
FROM testcafe/testcafe:1.17.1
USER root
RUN apk add docker-compose
USER user