Skip to content

Instantly share code, notes, and snippets.

View jonjohnsonjr's full-sized avatar

Jon Johnson jonjohnsonjr

  • 12:39 (UTC -07:00)
View GitHub Profile
package main
import (
"bufio"
"fmt"
"io"
"log"
"os"
"strings"
"time"
$ compass freeze gcr.io/distroless/base base/
2019/02/28 19:19:18 Pulling gcr.io/distroless/base
2019/02/28 19:19:19 Pulling gcr.io/distroless/base:033387ac8853e6cc1cd47df6c346bc53cbc490d8
2019/02/28 19:19:23 Pulling gcr.io/distroless/base:debug
2019/02/28 19:19:27 Pulling gcr.io/distroless/base:latest
$ tree base/
base/
├── blobs
│   └── sha256
# Putting annotations on the layer descriptor in the manifest.
# Pros:
# 1. Very intuitive, easy to parse/understand (by eye and in code).
# Cons:
# 1. If the target registry doesn't support OCI format annotations
# (probably most registries), this breaks.
# 2. If we are just copying a whole image over, this changes the manifest
# digest (not an issue, probably).
{
"schemaVersion": 2,