No description
Find a file
2019-11-05 14:02:15 +00:00
.copr rpm: crafting an rpmspec for this tool 2019-10-17 15:37:29 -04:00
test Merge pull request #45 from vbatts/fix_44 2019-10-16 09:59:39 +02:00
.gitignore rpm: crafting an rpmspec for this tool 2019-10-17 15:37:29 -04:00
.travis.yml travis: use bionic and the default bats 2019-10-15 15:59:59 +02:00
BuildSourceImage.sh WIP: build subcommand 2019-11-05 14:02:15 +00:00
BuildSourceImage.spec rpm: crafting an rpmspec for this tool 2019-10-17 15:37:29 -04:00
developing.md WIP: build subcommand 2019-11-05 14:02:15 +00:00
Dockerfile BuildSourceImage: expose "unpack" as subcommand 2019-10-15 15:26:02 +00:00
LICENSE Re-license as GPLV2 2019-09-11 14:20:08 -04:00
Makefile rpm: crafting an rpmspec for this tool 2019-10-17 15:37:29 -04:00
README.md WIP: build subcommand 2019-11-05 14:02:15 +00:00

BuildSourceImage

Build Status Container Image Repository on Quay

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.

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 used during the building of the resulting "works" of the cumulative sources

Usage

$> ./BuildSourceImage.sh -h
BuildSourceImage.sh version 0.1
Usage: BuildSourceImage.sh [-D] [-b <path>] [-c <path>] [-e <path>] [-r <path>] [-o <path>] [-i <image>] [-p <image>] [-l] [-d <drivers>]

       -b <path>        base path for source image builds
       -c <path>        build context for the container image. Can be provided via CONTEXT_DIR env variable
       -e <path>        extra src for the container image. Can be provided via EXTRA_SRC_DIR env variable
       -s <path>        directory of SRPMS to add. Can be provided via SRPM_DIR env variable
       -o <path>        output the OCI image to path. Can be provided via OUTPUT_DIR env variable
       -d <drivers>     enumerate specific source drivers to run
       -l               list the source drivers available
       -i <image>       image reference to fetch and inspect its rootfs to derive sources
       -p <image>       push source image to specified reference after build
       -D               debuging output. Can be set via DEBUG env variable
       -h               this usage information
       -v               version

    Subcommands:
       unpack   Unpack an OCI layout to a rootfs directory
       build    Builds a source image

Nicely usable as container quay.io/ctrs/bsi:

  • In this example we use only a prepared directory of .src.rpm's:
$> mkdir ./output/
$> podman run -it -v $(pwd)/output/:/output/ -v $(pwd)/SRCRPMS/:/data/ -u $(id -u) quay.io/ctrs/bsi -s /data/ -o /output/

Demos

  • Building from a fetched reference asciicast
  • Building from a directory of src.rpms: asciicast
  • Building from a directory of src.rpms and pushing it to a simple registry: asciicast

License

See the LICENSE file.