mirror of https://github.com/pyodide/pyodide.git
Merge pull request #355 from msabramo/run_docker-configurable
Allow configuring run_docker ports using env vars
This commit is contained in:
commit
f1b2d3bf39
14
run_docker
14
run_docker
|
@ -1,5 +1,13 @@
|
|||
#!/bin/sh
|
||||
DOCKER_PORT=8000
|
||||
SYSTEM_PORT=8000
|
||||
|
||||
docker run -p $SYSTEM_PORT:$DOCKER_PORT --rm -v $PWD:/src --user root -e NB_UID=$UID -e NB_GID=$GID -it iodide/pyodide-env:0.3.1 /bin/bash
|
||||
PYODIDE_DOCKER_PORT=${PYODIDE_DOCKER_PORT:-"8000"}
|
||||
PYODIDE_SYSTEM_PORT=${PYODIDE_SYSTEM_PORT:-"8000"}
|
||||
PYODIDE_DOCKER_IMAGE=${PYODIDE_DOCKER_IMAGE:-"iodide/pyodide-env:0.3.1"}
|
||||
|
||||
exec docker run \
|
||||
-p $PYODIDE_SYSTEM_PORT:$PYODIDE_DOCKER_PORT \
|
||||
-it --rm \
|
||||
-v $PWD:/src \
|
||||
--user root -e NB_UID=$UID -e NB_GID=$GID \
|
||||
${PYODIDE_DOCKER_IMAGE} \
|
||||
/bin/bash
|
||||
|
|
Loading…
Reference in New Issue