mirror of
https://github.com/imjasonh/kontain.me
synced 2026-07-07 00:32:28 +00:00
improve README, add tests, reinstate cache hits
This commit is contained in:
parent
a79099aa7e
commit
941448730c
4 changed files with 17 additions and 13 deletions
|
|
@ -4,16 +4,20 @@
|
|||
binary fetched using `go get` and built into a container image using
|
||||
[ko](https://github.com/google/ko).
|
||||
|
||||
For example, `docker pull ko.kontain.me/ko/github.com/google/ko/cmd/ko` will
|
||||
fetch, build and (eventually) serve a Docker image containing `ko` itself.
|
||||
_Koception!_
|
||||
|
||||
## Examples
|
||||
|
||||
Build and pull `ko` itself:
|
||||
|
||||
```
|
||||
docker pull ko.kontain.me/github.com/google/ko/cmd/ko
|
||||
docker pull ko.kontain.me/github.com/google/ko
|
||||
```
|
||||
|
||||
_Koception!_
|
||||
|
||||
Source is pulled from the Go module proxy, and as such, packages must use Go modules.
|
||||
|
||||
The `:latest` tag corresponds to the `@latest` version of the Go module, usually the highest semver tagged release.
|
||||
You can use tags like `:v1.2.3` to pull and build a specific release, or a branch name (e.g., `:main`) to build a branch.
|
||||
|
||||
Images are built for all available platforms, depending on their base image.
|
||||
Manifests are cached for faster rebuilds.
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ gcloud run deploy ko \
|
|||
--allow-unauthenticated \
|
||||
--set-env-vars=BUCKET=kontaindotme \
|
||||
--image=$(KO_DOCKER_REPO=gcr.io/kontaindotme ko publish -P ./cmd/ko) \
|
||||
--memory=4Gi \
|
||||
--cpu=2 \
|
||||
--memory=8Gi \
|
||||
--cpu=4 \
|
||||
--concurrency=1 \
|
||||
--timeout=900 # 15m
|
||||
|
|
|
|||
|
|
@ -118,10 +118,8 @@ func (s *server) serveKoManifest(w http.ResponseWriter, r *http.Request) {
|
|||
ck := cacheKey(ip, version)
|
||||
if _, err := s.storage.BlobExists(ctx, ck); err == nil {
|
||||
s.info.Println("serving cached manifest:", ck)
|
||||
/*
|
||||
serve.Blob(w, r, ck)
|
||||
return
|
||||
*/
|
||||
serve.Blob(w, r, ck)
|
||||
return
|
||||
}
|
||||
filepath := strings.TrimPrefix(ip, module)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
set -euxo pipefail
|
||||
|
||||
#time crane validate --remote=ko.kontain.me/github.com/google/ko
|
||||
#time crane validate --remote=ko.kontain.me/github.com/google/ko
|
||||
time crane validate --remote=ko.kontain.me/knative.dev/serving/cmd/controller:latest
|
||||
time crane validate --remote=ko.kontain.me/knative.dev/serving/cmd/controller:latest
|
||||
|
||||
time crane validate --remote=ko.kontain.me/knative.dev/serving/cmd/controller:v0.26.0
|
||||
time crane validate --remote=ko.kontain.me/knative.dev/serving/cmd/controller:main
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue