From 3a5cef10edc2af0cd2f94c58a5c839c876d6a99a Mon Sep 17 00:00:00 2001 From: Torsten Raudssus Date: Sun, 25 Jun 2023 21:41:05 +0200 Subject: [PATCH] No env bash --- docker-entrypoint.sh | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 5419176..a9fb872 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/bin/bash export IP=$( hostname -i ) @@ -9,13 +9,10 @@ if [[ ! -d "node_modules" ]]; then fi fi -if [[ -z "$@" ]] -then - if [[ -f "package.json" ]] - then +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 + if [[ -z "$PACKAGE_JSON_START" ]]; then echo "package.json found, but no start script, starting bash..." exec bash else