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" version: "3"
services: services:
testcafe: testcafe:
image: testcafe/testcafe:1.17.1 build: tests/
working_dir: /tests working_dir: /project/tests
# Run as root to have the right to access /var/run/docker.sock
user: root
environment: environment:
BROWSER: "chromium --use-fake-device-for-media-stream" BROWSER: "chromium --use-fake-device-for-media-stream"
volumes: volumes:
- ./tests:/tests - ./:/project
- ./maps:/maps - ./maps:/maps
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
# security_opt: # 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