🗃️ fixed the no echoip binary error 🗃️
All checks were successful
release-tag / release-image (push) Successful in 41m0s

rootfs/root/docker/setup/05-custom.sh
This commit is contained in:
casjay
2026-01-30 00:23:41 -05:00
parent 3198b23678
commit 040cc63985

View File

@@ -31,6 +31,36 @@ exitCode=0
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Main script # 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 # Set the exit code
#exitCode=$? #exitCode=$?