From 108e3e294917231c690dd06e3f0b18808f1f8c6f Mon Sep 17 00:00:00 2001 From: Elara Musayelyan Date: Wed, 16 Aug 2023 12:25:36 -0700 Subject: [PATCH] Add crane image --- crane/README.md | 3 +++ crane/build.sh | 17 +++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 crane/README.md create mode 100755 crane/build.sh diff --git a/crane/README.md b/crane/README.md new file mode 100644 index 0000000..c9d8d52 --- /dev/null +++ b/crane/README.md @@ -0,0 +1,3 @@ +# crane + +The [crane](https://gitea.elara.ws/Elara6331/-/packages/container/crane/latest) image contains Google's [crane](https://github.com/google/go-containerregistry/tree/main/cmd/crane) project. diff --git a/crane/build.sh b/crane/build.sh new file mode 100755 index 0000000..57fa3e1 --- /dev/null +++ b/crane/build.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +set -e + +# Clone go-containerregistry and enter crane's directory +git clone --depth=1 https://github.com/google/go-containerregistry.git +pushd go-containerregistry/cmd/crane + +# Build and publish the image +KO_DOCKER_REPO=gitea.elara.ws/elara6331 \ +KO_DEFAULTBASEIMAGE=gitea.elara.ws/elara6331/busybox \ +ko build -B \ + --platform=linux/amd64,linux/arm64,linux/riscv64 \ + --sbom=none + +# Leave crane's directory +popd