node-red/container-run.sh
2022-01-20 17:15:19 -07:00

11 lines
335 B
Bash
Executable File

#!/bin/bash
VERSION=$(grep -oE "\"version\": \"(\w*.\w*.\w*.\w*.\w*.)" package.json | cut -d\" -f4)
CONTAINER_ENGINE=$1
if [ -z $CONTAINER_ENGINE ]; then
CONTAINER_ENGINE=docker
fi
echo using $CONTAINER_ENGINE container engine...
$CONTAINER_ENGINE run -p 1880:1880 -v "$(pwd)"/data:/home/appuser/.node-red sparkle-guide:$VERSION &