본문으로 건너뛰기
cccskills
무료GitHub에 공개

actonos-build

Skill for building ActonOS: Web UI → Go binary → Docker image → ISO. Covers the entire build pipeline.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구Docker
설치 방법 보기

포함된 파일(1)

  • SKILL.md4.2 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

ActonOS Build Skill

Use this skill when building ActonOS artifacts: the frontend, Go binary, Docker image, or bare-metal ISO.

Build Pipeline Overview

make deps → make lint → make test → make test-race (Linux CI) → make build-web → make build → make docker → make iso
TargetWhat It DoesOutput
make depsInstall Go + Node dependencies—
make lintRun Go vet, gofmt, golangci-lint, ESLint—
make testRun all tests (unit + integration)build/coverage.out
make test-raceRun the Linux CGO race detectorRequired CI gate
make build-webBuild React frontend (Vite production)web/dist/
make buildBuild full actond binary (includes web)build/actond
make build-onlyBuild Go binary only (skip web rebuild)build/actond
make dockerBuild Docker imageactonos/actonos:VERSION
make isoBuild bare-metal installation ISObuild/ActonOS-vVERSION.iso
make allFull pipeline: lint → test → buildbuild/actond

Build Variables

The Go binary embeds version metadata via linker flags (-ldflags):

LDFLAGS := -s -w \
    -X main.Version=$(VERSION) \
    -X main.GitCommit=$(GIT_COMMIT)$(GIT_DIRTY) \
    -X main.BuildTime=$(BUILD_TIME)

These are read from:

  • VERSION file → main.Version
  • git rev-parse --short HEAD → main.GitCommit
  • date -u → main.BuildTime

Step-by-Step: Full Production Build

1. Build the Frontend

make build-web
# Runs: cd web && npm run build
# Output: web/dist/ (compressed static assets)

The frontend is built with Vite and produces gzip/brotli compressed assets that are embedded into the Go binary via go:embed.

2. Build the Go Binary

make build
# Runs: CGO_ENABLED=0 go build -trimpath -ldflags '...' -o build/actond ./cmd/actond/

Critical: Always build with CGO_ENABLED=0 for a fully static binary.

3. Cross-Compilation

# Linux AMD64 (default target for MiniPC/Docker)
GOOS=linux GOARCH=amd64 make build

# Linux ARM64 (for ARM-based devices)
GOOS=linux GOARCH=arm64 make build

4. Build Docker Image

make docker
# Output: actonos/actonos:VERSION and actonos/actonos:latest

The Dockerfile uses multi-stage build:

  1. Stage 1: Build Go binary
  2. Stage 2: Build frontend
  3. Stage 3: Alpine minimal runtime image (<35 MB)

5. Build ISO (Bare-metal)

# Requires: Debian/Ubuntu host with live-build and debootstrap
make iso
# Runs: bash scripts/build-iso.sh
# Output: build/ActonOS-vVERSION.iso

go:embed Integration

The built frontend assets are embedded into the Go binary:

// internal/server/static.go
//go:embed all:../../../web/dist
var embeddedAssets embed.FS

The layered_fs.go module implements a layered filesystem that checks /data/overrides/ before falling back to embedded assets, allowing runtime UI customization.

Verifying a Build

# Check binary version
./build/actond --version

# Check binary size
ls -lh build/actond

# Check it's truly static (no dynamic linking)
file build/actond
# Expected: "ELF 64-bit LSB executable, x86-64, statically linked"

# Quick smoke test
./build/actond --data-dir=./dev-data --log-level=debug &
curl http://localhost:8080/api/health
kill %1

Common Build Issues

IssueCauseSolution
web/dist not foundFrontend not builtRun make build-web first
CGO requiredUsing mattn/go-sqlite3Use modernc.org/sqlite instead
go:embed pattern matches no filesEmpty web/dist/Build frontend first
Binary not staticCGO_ENABLED=1Set CGO_ENABLED=0
Docker build OOMLow memory during Go buildIncrease Docker memory limit

Reference Files

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Skill for developing AI agent engine components in internal/agent/. Covers the ReAct loop, swarm delegation, planning, verification, memory reflection, and cron automation.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

actonos/actonos802026년 8월 31일 업데이트

Skill for developing REST API endpoints in internal/server/. Covers routing, request validation, WebSocket streaming, and API conventions.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

actonos/actonos802026년 8월 31일 업데이트

Skill for developing messaging channel adapters via WASM Plugins and managing routing, session state, pairing codes, and accounts in internal/channels/.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

actonos/actonos802026년 8월 31일 업데이트

Skill for developing the ActonOS React 19 + Tailwind v4 frontend adhering to the official DESIGN.md specification. Covers design tokens, component decomposition, zero-hardcoded-text i18n, and go:embed delivery.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

actonos/actonos802026년 8월 31일 업데이트

Skill for creating ActonOS releases. Covers version bumping, changelog management, git tagging, Docker image publishing, and ISO creation.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

actonos/actonos802026년 8월 31일 업데이트

Skill for initial ActonOS project setup, environment verification, and dependency installation.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

actonos/actonos802026년 8월 31일 업데이트

actonos의 스킬 모두 보기

이 스킬의 문제 신고