Krazy Kontainers
House moniker for the containers that hold KrazyToGo — Docker, Podman, or Kubernetes. Same software, same shape, on the runtime you already run.
gokrazy to-go · in a Krazy Kontainer pure Go · zero CGO GPL-3.0
KrazyToGo is a to-go, minified take on gokrazy —
shipped in a Krazy Kontainer you already run:
Docker, Podman, or
Kubernetes. Start with an efficient Go file server
(~5.4 MiB stripped, CGO_ENABLED=0, pure
net/http, /healthz). Add packages and grow
as large as you need — krazy huge, even a whole distro if you want.
Why
A minified gokrazy path in a Krazy Kontainer — Docker, Podman, or Kubernetes. Stay tiny and serve files in Go, or grow the stack: add packages, go krazy huge, shape a whole distro if that’s your goal.
House moniker for the containers that hold KrazyToGo — Docker, Podman, or Kubernetes. Same software, same shape, on the runtime you already run.
Core today: ~5.4 MiB stripped, pure net/http,
/healthz. Efficient Go file serving is enough —
and also krazy. Or grow: install packages, expand the image,
take it as far as you need.
Docker, Podman, and
Kubernetes are first-class ways to run the
Kontainer. Same binary, same flags, same /healthz.
Maintainer’s bet. Ship gokrazy’s spirit to-go: a container you can keep minimal or grow deliberately — with a well-defined file-server core and clear edges for auth and TLS. Different defaults? PRs and sharp arguments welcome.
Features
Point -root (or KRAZY_ROOT) at a directory. Directory browsing is optional via -browse.
/healthz for probes, Range requests for resumes. Flags beat env beat defaults — short unit files, clear precedence.
Multi-stage → FROM scratch, non-root UID. Mount a volume, publish a port — same shape under Docker and Podman.
Hardened manifests with PVC, runAsNonRoot, read-only root FS, and /healthz probes under deploy/kubernetes/.
Build with -tags gokrazy (listen :80, root /perm/files). Same binary for appliances and Kontainers — minified gokrazy spirit, container-native.
The file-server surface stays tight: no uploads, no WebDAV, no in-app auth, no UI. Pure net/http, no CGO. Auth and TLS live at the edge.
Quick start
/healthzCopy-paste from the public product README.
go install github.com/crimsonflower420/KrazyToGo/cmd/krazytogo@latest
mkdir -p data && echo hello > data/hello.txt
krazytogo -root ./data -addr :8080
# → http://127.0.0.1:8080/hello.txt
# → http://127.0.0.1:8080/healthz → 200 ok
mkdir -p data && echo hello > data/hello.txt
go run ./cmd/krazytogo -root ./data -addr :8080
CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o krazytogo ./cmd/krazytogo
./krazytogo -root ./data -addr :8080
curl -fsS http://127.0.0.1:8080/healthz
# → 200 ok
After any deploy, hit /healthz — probes and curl both get a plain 200 ok.
-root / KRAZY_ROOT./data; /data in images)-addr / KRAZY_ADDR:8080; :80 on gokrazy)-browse / KRAZY_BROWSEPrecedence: flags > env > defaults.
Deploy targets
Docker, Podman, and Kubernetes are equal ways to run a Krazy
Kontainer. Same binary on a gokrazy appliance when you bake it in
with -tags gokrazy.
Kontainer
Multi-stage → FROM scratch,
USER 65532:65532. Mount content, publish a port.
Same Krazy Kontainer image shape as Podman.
docker build -t krazytogo .
docker run -d -p 8080:8080 \
-v "$PWD/data:/data" \
-e KRAZY_ROOT=/data krazytogo
Kontainer
Same Dockerfile, same scratch image, rootless-friendly. Drop-in commands if you prefer Podman over Docker.
podman build -t krazytogo .
podman run -d -p 8080:8080 \
-v "$PWD/data:/data" \
-e KRAZY_ROOT=/data krazytogo
Kontainer
Hardened manifests under deploy/kubernetes/.
PVC (not hostPath), non-root, read-only root FS, /healthz probes.
kubectl apply -k deploy/kubernetes/
gokrazy note. Build with -tags gokrazy
(listen :80, root /perm/files) when you bake
the binary into an appliance image. Prefer Tailscale for access.
Same software path as the Kontainer — minified gokrazy, to-go.
FAQ
net/http, /healthz). From there you can add packages and grow — krazy huge, even toward a whole distro if you want.CGO_ENABLED=0, -ldflags=-s -w) on linux/amd64. Stdlib only — no module deps.File-server core
The in-process file-server surface stays tight. Grow the Kontainer (packages, larger images) around it; keep auth and TLS at the edge.
Support
KrazyToGo is free software under GPL-3.0. If gokrazy to-go in a Krazy Kontainer saves you an afternoon, a coffee keeps the maintainer caffeinated and the core binary sharp.