From c0629904c3e43ac938a6492b4c3887aed677cd45 Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Tue, 10 Sep 2019 14:27:21 -0400 Subject: [PATCH] README: updating for the new version Signed-off-by: Vincent Batts --- README.md | 47 ++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 42 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 14d0dbd..a0577fb 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,46 @@ # BuildSourceImage -Tool to build a source image based on an existing OCI image - - -This script uses BUILDAH to build source code container images based on -existing OCI images. +Tool to build a source image. The goal is to make retrieving the source code used to make a container image easier for users to obtain, using the standard OCI protocols and image formats. + +## Usage + +```bash +$> ./BuildSourceImage.sh -h +BuildSourceImage.sh version 0.1 +Usage: BuildSourceImage.sh [-D] [-b ] [-c ] [-e ] [-r ] [-o ] [-i ] [-p ] [-l] [-d ] + + -b base path for source image builds + -c build context for the container image. Can be provided via CONTEXT_DIR env variable + -e extra src for the container image. Can be provided via EXTRA_SRC_DIR env variable + -s directory of SRPMS to add. Can be provided via SRPM_DIR env variable + -o output the OCI image to path. Can be provided via OUTPUT_DIR env variable + -d enumerate specific source drivers to run + -l list the source drivers available + -i image reference to fetch and inspect its rootfs to derive sources + -p push source image to specified reference after build + -D debuging output. Can be set via DEBUG env variable + -h this usage information + -v version + +``` + +It also nicely usable inside a container +```bash +$> buildah build-using-dockerfile -t containers/buildsourceimage . +``` + +## Examples + +* Building from a fetched reference [![asciicast](https://asciinema.org/a/266340.svg)](https://asciinema.org/a/266340) +* Building from a directory of src.rpms: [![asciicast](https://asciinema.org/a/266341.svg)](https://asciinema.org/a/266341) +* Building from a directory of src.rpms and pushing it to a simple registry: [![asciicast](https://asciinema.org/a/266343.svg)](https://asciinema.org/a/266343) + +## Use Cases + +* Build a source image from an existing container image by introspection +* Build a source code image from a collection of known `.src.rpm`'s +* Include additional build context into the source image +* Include extra sources use +