Skip to content
Snippets Groups Projects
Commit db501bd0 authored by jurgenhaas's avatar jurgenhaas
Browse files

#5 Properly start the container such that node processes can be terminated

Name the container per project and reuse the same container when possible
parent cd7f54f3
No related branches found
No related tags found
No related merge requests found
Pipeline #6178 passed
#!/bin/bash
docker run --rm -t -v $(php /usr/local/bin/volume.php) -w $PWD node:8-jessie-slim node $@
NAME=${HOSTNAME}_node
ID=$(docker container ls -q -f name=${NAME})
if [[ -n ${ID} ]]; then
docker exec -it --name=${NAME} -w ${PWD} node $@
else
docker run --init -it --name=${NAME} -v $(php /usr/local/bin/volume.php) -w ${PWD} node:8-jessie-slim node $@
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment