Skip to content

Latest commit

 

History

History
41 lines (29 loc) · 1.22 KB

README.md

File metadata and controls

41 lines (29 loc) · 1.22 KB

Node docker image with latest stable firefox

Fully dockerized latest stable firefox based on selenium/node-firefox with nodejs & yarn preinstalled

Why

This project enables you to use a real firefox for example for e2e testing (with tools like testcafe) directly in CI.

It could be used as base for your custom image.

Global testcafe example:

FROM romischart/node-firefox:latest

RUN yarn global add testcafe \
    && mkdir -p /usr/src/app/testcafe

WORKDIR /usr/src/app/testcafe

and now you need to build the custom image and run the tests with docker volume mounting:

docker build -t testcafe-firefox .

docker run -v /path/to/tests:/usr/src/app/testcafe testcafe-firefox:latest testcafe firefox:headless -s *.testcafe.js

Local testcafe example:

docker run -it -v /path/to/tests:/home/node romischart/node-firefox:latest yarn testcafe firefox:headless

Custom node version

You can build your own image with your custom node version, you need only to pass NODE_VERSION argument at build time:

FROM romischart/node-firefox:latest
docker build . -t custom-node-version --build-arg NODE_VERSION=12.16.1