Web Dev Solutions

Catalin Mititiuc

aboutsummaryrefslogtreecommitdiff
blob: 1c162baf0b4276d76e83cc695465d76eb8e56481 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env bash

NPM_COMMAND="npm run test:integ"
CONTAINER_NAME=$(docker container ls --all --filter=ancestor=btroops --format "{{.Names}}")

if [[ -z "${CONTAINER_NAME}" ]]
then
  docker run --rm -it -v $PWD:/usr/src/app btroops $NPM_COMMAND
else
  docker exec -it $CONTAINER_NAME $NPM_COMMAND
fi