Skip to content

Instantly share code, notes, and snippets.

@sallyom
Created October 19, 2023 15:13
Show Gist options
  • Save sallyom/2960f1bd1ff9b4cc848db82e15b4f321 to your computer and use it in GitHub Desktop.
Save sallyom/2960f1bd1ff9b4cc848db82e15b4f321 to your computer and use it in GitHub Desktop.
binary-image-ex
#!/usr/bin/env bash
set -o errexit
# Create a container
container=$(buildah from alpine)
# Run this from wherever the built binaries are available
buildah config --label maintainer="Sally O'Malley <[email protected]>" $container
buildah copy $container /path/to/kn-amd64.tar.gz /kn/amd64/kn.tar.gz
buildah copy $container /path/to/kn-darwin.tar.gz /kn/darwin/kn.tar.gz
buildah copy $container /path/to/kn-windows.tar.gz /kn/windows/kn.zip
# Finally saves the running container to an image
buildah commit --format docker $container quay.io/sallyom/kn:latest
podman push quay.io/sallyom/kn:latest
@sallyom
Copy link
Author

sallyom commented Oct 19, 2023

From each cli repo, added as a make target, could create this 1 image for each

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment