Web Dev Solutions

Catalin Mititiuc

#!/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