26 lines
408 B
Bash
26 lines
408 B
Bash
|
#!/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}
|