Files
skillshare/docker/ci/Dockerfile
T
Willie 41e822d979 feat: remove go:embed, serve UI exclusively via runtime download
Replace the embedded SPA (go:embed + build tags) with runtime download
from GitHub Releases. The binary no longer bundles UI assets — they are
downloaded on first `skillshare ui` launch and cached at
~/.cache/skillshare/ui/<version>/.

- Delete embed.go / embed_dev.go; add spa_disk.go with placeholder handler
- Simplify ensureUIAvailable(): cache check before dev-mode fallback
- Pre-download UI assets in `skillshare upgrade` (best-effort)
- Remove Node stages from production and CI Dockerfiles
- Keep Node stage in sandbox for playground UI cache pre-population
- Remove ui-embed-check CI job and -tags dev build flag
- Update Makefile, mise.toml, GoReleaser, release workflow
2026-02-16 02:58:22 +08:00

22 lines
754 B
Docker

# CI Dockerfile — minimal image for skill validation in pipelines
# Usage: docker run ghcr.io/<org>/skillshare-ci audit /path/to/skills
# Build: docker build -f docker/ci/Dockerfile -t skillshare-ci .
# Stage 1: Build Go binary
FROM golang:1.25.5-bookworm AS go-builder
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY . .
ARG TARGETARCH=amd64
RUN CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} \
go build -trimpath -ldflags="-s -w" -o /skillshare ./cmd/skillshare
# Stage 2: Minimal CI runtime
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
git ca-certificates && \
rm -rf /var/lib/apt/lists/*
COPY --from=go-builder /skillshare /usr/local/bin/skillshare
ENTRYPOINT ["skillshare"]