mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-19 02:17:09 +00:00
- Add `make sandbox-logs` / `mise run sandbox:logs` convenience target - Unify Docker build versions via ARG: Node 24, pnpm 10.28.0, Go 1.25.5 - Extract shared demo content to scripts/create-demo-content.sh, slim down setup.sh and sandbox_playground_up.sh from ~150 duplicated lines each - Move devcontainer scripts (ui, ui-p, docs) to .devcontainer/bin/ (source-controlled, survives make clean) with auto mode-switching
23 lines
783 B
Docker
23 lines
783 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
|
|
ARG GO_VERSION=1.25.5
|
|
FROM golang:${GO_VERSION}-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"]
|