First commit of the node docker image after move out of core
This commit is contained in:
commit
9ffd5c63d3
4 changed files with 124 additions and 0 deletions
23
docker-entrypoint.sh
Executable file
23
docker-entrypoint.sh
Executable file
|
@ -0,0 +1,23 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
IP=$( hostname -i )
|
||||
|
||||
if [[ -z "$@" ]]
|
||||
then
|
||||
if [[ -f "package.json" ]]
|
||||
then
|
||||
PACKAGE_JSON_START=$( cat package.json | jq -r '.scripts.start // empty' )
|
||||
if [[ -z "$PACKAGE_JSON_START" ]]
|
||||
then
|
||||
echo "package.json found, but no start script, starting bash..."
|
||||
exec bash
|
||||
else
|
||||
exec $PACKAGE_JSON_START
|
||||
fi
|
||||
else
|
||||
echo "No package.json found, starting bash..."
|
||||
exec bash
|
||||
fi
|
||||
else
|
||||
exec $@
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue