No description
  • Shell 93.6%
  • Makefile 5.1%
  • Awk 0.9%
  • Dockerfile 0.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Daniel J Walsh e9feb7b8e5
Merge pull request #105 from containers/renovate/major-ci-vm-image
Update dependency containers/automation_images to v20240513
2024-05-22 17:11:35 -04:00
.copr rpm: crafting an rpmspec for this tool 2019-10-17 15:37:29 -04:00
.github Add renovate configuration 2023-04-13 14:47:57 -04:00
contrib/cirrus migrate to Cirrus CI 2020-01-08 11:11:20 +01:00
test fix tests 2024-01-17 10:26:07 +01:00
.cirrus.yml Update dependency containers/automation_images to v20240513 2024-05-13 20:27:23 +00:00
.gitignore rpm: crafting an rpmspec for this tool 2019-10-17 15:37:29 -04:00
BuildSourceImage.sh Increase counter as numeric rather than string 2024-01-15 22:00:06 +08:00
BuildSourceImage.spec.in more of a dynamic spec and srpm 2020-03-04 15:05:51 -05:00
CODE-OF-CONDUCT.md Add Code of Conduct 2020-02-08 15:51:39 -05:00
developing.md *: add a doc for development 2019-10-15 15:26:18 +00:00
Dockerfile Dockerfile: use skopeo/stable image 2021-12-06 08:43:09 +01:00
layout.md BuildSourceImage: include annotation for "license" 2020-03-03 10:05:33 -05:00
LICENSE Re-license as GPLV2 2019-09-11 14:20:08 -04:00
Makefile more of a dynamic spec and srpm 2020-03-04 15:05:51 -05:00
README.md *: remove building from a remote image reference 2020-03-03 14:06:03 -05:00
SECURITY.md Add Security Policy 2020-05-09 14:21:22 -04:00

Build Status Container Image Repository on Quay

BuildSourceImage

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

$> ./BuildSourceImage.sh -h
BuildSourceImage.sh version 0.1
Usage: BuildSourceImage.sh [-D] [-b <path>] [-c <path>] [-e <path>] [-r <path>] [-o <path>] [-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
       -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

Nicely usable inside a container:

$> mkdir ./output/
$> podman run -it -v $(pwd)/output/:/output/ -v $(pwd)/SRCRPMS/:/data/ -u $(id -u) quay.io/ctrs/bsi -s /data/ -o /output/

Examples

  • 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

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