start_sass-bootstrap_project/docker-node.sh
2022-11-07 13:09:12 +01:00

26 lines
408 B
Bash
Executable File

#!/bin/bash
# exécute toujours dans le répertoire
cd $(dirname $0)
if [ $# -eq 0 ]
then
cmd=bash
else
cmd="${@}"
fi
docker run \
--rm \
--interactive \
--tty \
--user $(id -u):$(id -g) \
--volume ${PWD}/app:/app \
--volume ${PWD}/app/node_modules:/app/node_modules \
--workdir /app \
-p 8080:8080 \
-p 8081:8081 \
--env YARN_CACHE_FOLDER=/app/.yarncache \
node:14 \
${cmd}