~/glance-gate — zsh — 96×40

glance-gate — make your Dockerfile small and secure

make your Dockerfile small and secure on your machine, in your editor, nothing uploaded.

  • 45 MBverified Node Tier‑0
  • 0CVEs at every severity
  • 6language overlays
  • 0data uploaded

$ a live run

~/your-app $
thinking
  • auditnode · pnpm · 56 workspace plugins · 2 dynamic imports
  • tier 0esbuild bundle → bun --compile → alpine:3.20 musl
  • smokemongo sidecar · GET /api/ping=200 · uid=1000 · SIGTERM 190ms
  • scantrivy — 17 critical CVEs on the old base, musl drops them
done — wrote Dockerfile_final
image size 400 MB 59 MB
security 17 critical 0 alerts
check the report: glance-gate-report.md
before
400 MB · 17 critical CVEs
after
59 MB · 0 CVEs · −85%

$ pick a language

Same skill. Different overlays. Same deliverable.

target: alpine:3.20 (musl) verified: 45 MB · 0 CVEs pipeline: esbuild → bun --compile
FROM node:20.18-bookworm-slim AS bundle
RUN npm install -g [email protected]
COPY . .
RUN pnpm install --frozen-lockfile
RUN esbuild src/main.ts --bundle --platform=node --target=node20 \
      --format=cjs --keep-names --tree-shaking=false \
      --minify-whitespace --minify-syntax --outfile=/out/server.js

FROM oven/bun:1.3.10-alpine AS compile
COPY --from=bundle /out/server.js ./
RUN bun build ./server.js --compile --minify \
      --target=bun-linux-arm64-musl --outfile=/work/app

FROM alpine:3.20
RUN apk add --no-cache libstdc++ libgcc ca-certificates tzdata \
 && adduser -u 1000 -D app
COPY --from=compile --chown=1000:1000 /work/app /app/server
USER 1000:1000
ENTRYPOINT ["/app/server"]

$ what you get

01

local-first

Runs inside your Claude Code session, against your filesystem, using your Anthropic API key. Nothing exfiltrated.

02

6 language overlays

Node, Python, Go, Rust, Java, Ruby. Each with bundle audit, native-deps detection, package-manager handling, framework gotchas.

03

tier ladder

Tier 0 (musl static binary on scratch / alpine) → Tier 1 (bundled artifact on distroless) → Tier 2 (deps tree on distroless). Audit picks the start; soft fall-through to the next on failure.

04

musl-first security

Drops debian glibc / libssl3 CVEs that upstream won't patch. Same result, different libc, fresher CVE feed.

05

real smoke test

Every build runs docker run with an optional Mongo/Postgres/Redis sidecar, HTTP probes, uid check, and a SIGTERM deadline. PASS or it doesn't ship.

06

cve scan + sbom + report

Trivy / Grype / Docker Scout for CVEs. Syft (or Trivy SPDX) for the SBOM. A tier-aware markdown report at the workdir root. Every run.


$ how it compares

glance-gate Docker Scout Snyk Container Chainguard
Rewrites the Dockerfile
Local, nothing uploadedpartial
Open sourceApache 2.0partialpartial
CVE scan
SBOM
Cost to start$0 + your keyfreemiumpaidpaid

$ trust model

  • The skill never reads files outside the project working directory.
  • All AI inference runs in your Claude Code session against your Anthropic key.
  • Zero outbound network from the skill itself. docker, trivy, syft do their own network — same as if you ran them by hand.
  • The optional learning API (scripts/glance-api.sh) adds opt-in network: only recall / record / articles endpoints, every payload AES-256-CBC encrypted with a per-device key.
  • No registry pushes, no signing, no calls to your Docker registry. The skill produces a Dockerfile; you decide what to do with it.

$ install

It's three commands. The whole skill is <100 KB.

git clone https://github.com/amineorion/glance-gate-skill.git ~/.claude/skills/glance-gate
# restart Claude Code, then type /skills to verify

Required local tools:

# macOS
brew install aquasecurity/trivy/trivy syft

Then in any project:

/glance-gate optimize this Dockerfile

~/glance-gate $ _