From 2ffee578632c9a60080ba32405509c4e303d4c98 Mon Sep 17 00:00:00 2001 From: Gyurix Date: Mon, 9 Sep 2024 14:33:17 +0200 Subject: [PATCH] removed sed replace when looking for dns --- Dockerfile | 5 +++-- entrypoint.sh | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7c57bb5..3a706cd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,5 @@ -FROM minimal:2.35 -MAINTAINER gyurix +FROM alpine + +RUN apk add --update --no-cache openssl jq curl ca-certificates busybox-extras COPY entrypoint.sh /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"] diff --git a/entrypoint.sh b/entrypoint.sh index 496d55d..8c2402a 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -71,7 +71,7 @@ name_resolver() { EXISTS=$(grep -w $D $HOST_FILE); #EXISTS=$(grep -w "$D-" $HOST_FILE); # TODO? if [ -n "$EXISTS" ]; then # selector exists in hosts file - APP_IP=$(echo $EXISTS | sed s/$D//g); # remove all selectors + APP_IP=$(echo $EXISTS | awk '{print $1}'); # remove all selectors debug "APP_IP: "$APP_IP; else debug "no matching APPLICATION NAME found in $HOST_FILE"