diff --git a/manage.sh b/manage.sh index 90428a8e30..d89a4f3e77 100755 --- a/manage.sh +++ b/manage.sh @@ -104,6 +104,21 @@ function run-devenv-shell { penpot-devenv-main sudo -EH -u penpot bash; } +function run-devenv-isolated-shell { + docker volume create ${DEVENV_PNAME}_user_data; + docker run -ti --rm \ + --mount source=${DEVENV_PNAME}_user_data,type=volume,target=/home/penpot/ \ + --mount source=`pwd`,type=bind,target=/home/penpot/penpot \ + -e EXTERNAL_UID=$CURRENT_USER_ID \ + -e BUILD_STORYBOOK=$BUILD_STORYBOOK \ + -e BUILD_WASM=$BUILD_WASM \ + -e SHADOWCLJS_EXTRA_PARAMS=$SHADOWCLJS_EXTRA_PARAMS \ + -e JAVA_OPTS="$JAVA_OPTS" \ + -w /home/penpot/penpot/$1 \ + $DEVENV_IMGNAME:latest sudo -EH -u penpot bash +} + + function build { echo ">> build start: $1" local version=$(print-current-version); @@ -233,6 +248,7 @@ function usage { echo "- drop-devenv Remove the development oriented docker compose containers, volumes and clean images." echo "- run-devenv Attaches to the running devenv container and starts development environment" echo "- run-devenv-shell Attaches to the running devenv container and starts a bash shell." + echo "- isolated-shell Starts a bash shell in a new devenv container." echo "- log-devenv Show logs of the running devenv docker compose service." echo "" echo "- build-bundle Build all bundles (frontend, backend and exporter)." @@ -280,6 +296,11 @@ case $1 in run-devenv-shell) run-devenv-shell ${@:2} ;; + + isolated-shell) + run-devenv-isolated-shell ${@:2} + ;; + stop-devenv) stop-devenv ${@:2} ;;