Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ungtb10d/buildsourceimage
https://github.com/ungtb10d/buildsourceimage
Last synced: 13 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/ungtb10d/buildsourceimage
- Owner: ungtb10d
- License: gpl-2.0
- Created: 2022-10-14T09:30:10.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-10-14T09:30:19.000Z (over 2 years ago)
- Last Synced: 2024-11-12T03:23:51.598Z (2 months ago)
- Language: Shell
- Size: 125 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE-OF-CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
[![Build Status](https://api.cirrus-ci.com/github/containers/BuildSourceImage.svg)](https://cirrus-ci.com/github/containers/BuildSourceImage/master)
[![Container Image Repository on Quay](https://quay.io/repository/ctrs/bsi/status "Container Image Repository on Quay")](https://quay.io/repository/ctrs/bsi)# 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
```bash
$> ./BuildSourceImage.sh -h
BuildSourceImage.sh version 0.1
Usage: BuildSourceImage.sh [-D] [-b ] [-c ] [-e ] [-r ] [-o ] [-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
-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```
Nicely usable inside a container:
```bash
$> 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](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