This is a circleci node based docker image that has the following ;
- Firefox and geckodriver
- Chrome and it's webdriver
- PhantomJs
- JDK 8
- Pa11y for accessibility testing
- Cloud foundry command line tool
This image was created specifically to handle selenium tests. It has been tested with Selenium, Nightmare using (Electorn), Pa11y.
docker build -t <image_name> .
docker build -t saumarah/circleci_node_selenium .
Create a new Dockerfile
FROM saumarah/circleci_node_selenium:1.1.0
WORKDIR /home/circleci/app
ENV DEBUG="nightmare*,electron*"
COPY package.json /home/circleci/app/
RUN npm i
RUN npm run build
EXPOSE 3000
CMD npm run start
Run it
docker run -p 3000:3000 frontend-image
Execute a certain command
docker ps
docker exec -it 5f6f74a73d30 npm run test:acceptance