Files
openfang/scripts/docker/install-smoke.Dockerfile
jaberjaber23 5692c96494 Initial commit — OpenFang Agent Operating System
Open-source Agent OS built in Rust.

- 14 crates, 1,767+ tests, zero clippy warnings
- 7 autonomous Hands (Clip, Lead, Collector, Predictor, Researcher, Twitter, Browser)
- 16 security systems (WASM sandbox, Merkle audit trail, taint tracking, Ed25519 signing, SSRF protection, secret zeroization, HMAC-SHA256 mutual auth, and more)
- 30 pre-built agents across 4 performance tiers
- 40 channel adapters (Telegram, Discord, Slack, WhatsApp, Teams, and 35 more)
- 38 built-in tools + MCP client/server + A2A protocol
- 26 LLM providers with intelligent routing and cost tracking
- 60+ bundled skills with FangHub marketplace
- Tauri 2.0 native desktop app
- 140+ REST/WS/SSE API endpoints with Alpine.js dashboard
- OpenAI-compatible /v1/chat/completions endpoint
- One-command install, production-ready
2026-02-26 01:00:27 +03:00

56 lines
1.8 KiB
Docker

# Smoke test for install.sh
# Verifies the installer works in a clean environment.
#
# Usage (CI):
# docker build -f scripts/docker/install-smoke.Dockerfile .
#
# Usage (full E2E — requires a published release):
# docker build -f scripts/docker/install-smoke.Dockerfile \
# --build-arg OPENFANG_SMOKE_FULL=1 .
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y \
curl \
ca-certificates \
bash \
&& rm -rf /var/lib/apt/lists/*
# Create a non-root user (simulates real user install)
RUN useradd -m -s /bin/bash testuser
USER testuser
WORKDIR /home/testuser
# Copy the install script from the build context
COPY scripts/install.sh /tmp/install.sh
ARG OPENFANG_SMOKE_FULL=0
RUN if [ "$OPENFANG_SMOKE_FULL" = "1" ]; then \
bash /tmp/install.sh; \
else \
# 1. Syntax check
bash -n /tmp/install.sh && \
echo "PASS: install.sh syntax is valid" && \
# 2. Verify detect_platform works by extracting the function
bash -c ' \
eval "$(sed -n "/^detect_platform/,/^}/p" /tmp/install.sh)" && \
detect_platform && \
echo "PASS: platform detected as $PLATFORM" \
' && \
# 3. Verify target matches release naming (must contain -unknown-linux-gnu)
bash -c ' \
eval "$(sed -n "/^detect_platform/,/^}/p" /tmp/install.sh)" && \
detect_platform && \
echo "$PLATFORM" | grep -q "linux-gnu" && \
echo "PASS: target is gnu (matches release.yml)" \
'; \
fi
# If full install succeeded, verify the binary works
RUN if [ "$OPENFANG_SMOKE_FULL" = "1" ] && [ -f "$HOME/.openfang/bin/openfang" ]; then \
$HOME/.openfang/bin/openfang --version && \
echo "PASS: openfang binary works"; \
else \
echo "SKIP: binary verification (no full install)"; \
fi