- Node application which need redis to run functional test cases.
- docker-compose is used to spin redis container as initial setup from within test case
- have a docker-compose.yml file with redis service
FROM docker
RUN apk add --no-cache nodejs nodejs-npm docker-compose
COPY . .
RUN npm i
ENTRYPOINT npm run test
docker build . --tag app docker run -v /var/run/docker.sock:/var/run/docker.sock --name new-app -ti app
The -v flag will enable the docker container to spin sibling containers. No need for DIND.