# kontain.me [![CI](https://github.com/imjasonh/kontain.me/actions/workflows/ci.yaml/badge.svg?event=push)](https://github.com/imjasonh/kontain.me/actions/workflows/ci.yaml) [![Deploy](https://github.com/imjasonh/kontain.me/actions/workflows/deploy.yaml/badge.svg)](https://github.com/imjasonh/kontain.me/actions/workflows/deploy.yaml) Serving container images generated on-demand, at the time they are requested. These include: * [`random.kontain.me`](./cmd/random), which serves randomly-generated images. - [browse](https://oci.dag.dev/?image=random.kontain.me/random) * [`mirror.kontain.me`](./cmd/mirror), which pulls and caches images from other registries. - [browse](https://oci.dag.dev/?image=mirror.kontain.me/busybox) * [`flatten.kontain.me`](./cmd/flatten), which pulls and flattens images from other registries, so they contain only one layer. - [browse](https://oci.dag.dev/?image=flatten.kontain.me/cgr.dev/chainguard/go) * [`ko.kontain.me`](./cmd/ko), which builds a Go binary into a container image using [`ko`](https://github.com/google/ko). - [browse](https://oci.dag.dev/?image=ko.kontain.me/github.com/ko-build/ko/test) * [`apko.kontain.me`](./cmd/apko), which builds a minimal base image containing APK packages, using [`apko`](https://apko.dev). - [browse](https://oci.dag.dev/?image=apko.kontain.me/kubectl) * [`git.kontain.me`](./cmd/git), which serves an image containing a shallow clone of a Git repo at a given branch, tag, or commit, using [`go-git`](https://github.com/go-git/go-git). - [browse](https://oci.dag.dev/?image=git.kontain.me/github.com/imjasonh/kontain.me) This repo also serves a few non-registry oddities: * [`viz.kontain.me`](./cmd/viz) visualizes shared image layers using [Graphviz](https://graphviz.org/). * [`infinite-git.kontain.me`](./cmd/infinite-git) is a Git HTTP server that generates a new commit every time the repo is pulled. * [`infinite-go.kontain.me`](./cmd/infinite-go) is a Go module that generates a new module version every time it's fetched. # Caveats * The registry does not accept pushes. * This is a silly hack and probably isn't stable. Don't rely on it for anything serious. * It could probably do a lot of smart things to be a lot faster. 🤷 * Blobs and manifests are cached for 24 hours wherever possible, but will be rebuilt from scratch after that time. # How it works The service is built on [Google Cloud Run](https://cloud.google.com/run). When the service receives a request for an image manifest, it parses the request and generates layers for the requested image, writing the manifest and blobs to [Google Cloud Storage](https://cloud.google.com/storage/). After it receives the manifest, `docker pull` fetches the blobs. The app simply redirects to Cloud Storage to serve manifests and blobs.