From 040cc63985a9082850b766f148006877e06137e2 Mon Sep 17 00:00:00 2001 From: casjay Date: Fri, 30 Jan 2026 00:23:41 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=97=83=EF=B8=8F=20fixed=20the=20no=20echo?= =?UTF-8?q?ip=20binary=20error=20=F0=9F=97=83=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit rootfs/root/docker/setup/05-custom.sh --- rootfs/root/docker/setup/05-custom.sh | 30 +++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/rootfs/root/docker/setup/05-custom.sh b/rootfs/root/docker/setup/05-custom.sh index 9eeb3cb..9831b9e 100755 --- a/rootfs/root/docker/setup/05-custom.sh +++ b/rootfs/root/docker/setup/05-custom.sh @@ -31,6 +31,36 @@ exitCode=0 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Main script +# Install echoip binary +ECHOIP_VERSION="${ECHOIP_VERSION:-latest}" +echo "Installing echoip binary using Go" + +# Install Go if not present (Alpine should have it in base image) +if ! command -v go &>/dev/null; then + echo "Go not found, installing..." + pkmgr install go || apk add --no-cache go +fi + +# Build and install echoip +if command -v go &>/dev/null; then + echo "Building echoip from source..." + export GOPATH="/tmp/go" + export GO111MODULE=on + if go install github.com/mpolden/echoip/cmd/echoip@latest 2>/dev/null; then + mkdir -p /opt/echoip + mv "$GOPATH/bin/echoip" /opt/echoip/echoip + chmod +x /opt/echoip/echoip + rm -rf "$GOPATH" + echo "echoip binary installed successfully" + else + echo "Failed to build echoip from source" + exitCode=1 + fi +else + echo "Go compiler not available, cannot build echoip" + exitCode=1 +fi + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Set the exit code #exitCode=$?