Public Repository

Last pushed: 2 years ago
Short Description
run docker-compose + cucumber docker-in-docker
Full Description

Run cucumber in Docker

You do not need cucumber on your host machine. You can instead run the cucumber tests in a Docker container. The container itself uses Docker-in-Docker.

Build cucumber container

First you have to build the "docker-compose-in-docker" container with cucumber, rlpr, docker-compose and dind inside.

docker build -t plossys/cucumber .

You can skip this step as the docker image is also available from the Docker hub registry.

Run cucumber container

To run the cucumber tests, use the following command.

docker run --rm --privileged -ti -v $(pwd)/..:/data plossys/cucumber

Investigate a scenario

To investigate a scenario you can set further environment variables for the cucumber support code with additional -e options. The best option is to use ONERROR=wait so cucumber halts after the first error.

docker run --rm --privileged --name=cucumber -ti -v $(pwd)/..:/data -e LOG=file -e ONERROR=wait plossys/cucumber

To show a log file of a container, use docker exec and inside the container docker logs as usual.

docker exec -ti cucumber docker logs cucumber_housekeeper_1 | flaschenpost

After investigation you can just press CTRL+c to abort the cucumber run.

Docker Pull Command