diff --git a/setup.sh b/setup.sh index ce743e7..f50efd8 100644 --- a/setup.sh +++ b/setup.sh @@ -71,7 +71,13 @@ chmod +x "${APP_DIR}/main.py" "${WALLARM_DIR}/deploy.sh" # ── Install Docker (for container-based deployment) ────────────────── if ! command -v docker >/dev/null 2>&1; then echo -e "${YELLOW}Installing Docker...${NC}" - if command -v apt-get >/dev/null 2>&1; then + # Check for offline Docker binary first + if [ -f "${WALLARM_DIR}/offline/docker-29.2.1.tgz" ]; then + echo -e "${YELLOW} Using offline Docker binary...${NC}" + tar -xzf "${WALLARM_DIR}/offline/docker-29.2.1.tgz" -C /usr/local/bin/ + dockerd & + sleep 2 + elif command -v apt-get >/dev/null 2>&1; then apt-get install -y -qq docker.io 2>/dev/null elif command -v yum >/dev/null 2>&1; then yum install -y -q docker 2>/dev/null @@ -82,6 +88,12 @@ if ! command -v docker >/dev/null 2>&1; then systemctl start docker 2>/dev/null || true fi +# ── Pre-cache Wallarm Docker image if offline file exists ───────────── +if [ -f "${WALLARM_DIR}/offline/wallarm-node-6.13.0.tar" ]; then + echo -e "${YELLOW}Loading offline Wallarm image...${NC}" + docker load -i "${WALLARM_DIR}/offline/wallarm-node-6.13.0.tar" 2>/dev/null || true +fi + echo echo -e "${GREEN}${BOLD}Ready!${NC}" echo -e " ${GREEN}sudo /opt/fw/deploy.sh${NC}"