mirror of
https://github.com/imjasonh/kontain.me
synced 2026-07-11 10:20:56 +00:00
40 lines
1.8 KiB
Markdown
40 lines
1.8 KiB
Markdown
**kontain.me** serves Docker container images generated on-demand at the
|
|
time they are requested.
|
|
|
|
These include:
|
|
|
|
* [`random.kontain.me`](./cmd/random), which serves randomly-generated images.
|
|
* [`mirror.kontain.me`](./cmd/mirror), which pulls and caches images from other registries.
|
|
* [`flatten.kontain.me`](./cmd/flatten), which pulls and flattens images from other registries,
|
|
so they contain only one layer.
|
|
* [`kaniko.kontain.me`](./cmd/kaniko), which builds a GitHub repo using
|
|
[Kaniko](https://github.com/GoogleContainerTools/kaniko).
|
|
* [`ko.kontain.me`](./cmd/ko), which builds a Go binary into a container image using
|
|
[`ko`](https://github.com/google/ko).
|
|
* [`buildpack.kontain.me`](./cmd/buildpack), which builds a GitHub repo using [CNCF
|
|
Buildpacks](https://buildpacks.io).
|
|
* [`wait.kontain.me`](./cmd/wait), which enqueues a background task to serve a
|
|
random image after some amount of time.
|
|
|
|
This repo also serves [`viz.kontain.me`](./cmd/viz), which visualizes shared
|
|
image layers using [Graphviz](https://graphviz.org/).
|
|
|
|
# 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 implemented using [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.
|