Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cgwalters/osbuildbootc
https://github.com/cgwalters/osbuildbootc
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/cgwalters/osbuildbootc
- Owner: cgwalters
- License: apache-2.0
- Created: 2023-11-11T17:05:19.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-11T00:56:03.000Z (12 months ago)
- Last Synced: 2024-01-11T01:51:46.218Z (12 months ago)
- Language: Go
- Size: 1.36 MB
- Stars: 4
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# osbuildbootc
## Usage
This tool can be invoked as a pre-built container image, and it can also be installed
as a standalone tool inside another environment. The implementation uses qemu+KVM.Example invocation for the container image:
```bash
podman run --rm -ti --security-opt label=disable --device /dev/kvm -v $(pwd):/srv -w /srv ghcr.io/cgwalters/osbuildbootc:latest build-qcow2 -I quay.io/cgwalters/ostest example.qcow2
```Explanation of podman arguments:
- `--security-opt label=disable`: This is necessary to bind mount in host paths at all
- `--device /dev/kvm`: Pass the KVM device into the container image
- `-v $(pwd):/srv -w /srv`: Pass the current directory as `/srv` into the containerNote that by default KVM is required. You can set the `OSBUILD_NO_KVM` environment variable
to use full qemu emulation if necessary.### Take a container image from remote registry, output a qcow2
```bash
osbuildbootc build-qcow2 quay.io/centos-bootc/fedora-bootc-cloud:eln fedora-boot-cloud.qcow2
```### Take a container image stored in local OCI directory
In some scenarios it may be desirable to have local disk caches of container images,
instead of fetching from a registry every time.Note here we need to specify the *target* image after installtion to ensure that
the machine will fetch updates from the registry.```bash
osbuildbootc build-qcow2 --transport oci oci:cgwalters-ostest -I -t quay.io/cgwalters/ostest foo.qcow2
```## Development
This project is mostly in Go. However, it also has some shell script because
some nontrivial code was inherited from [coreos-assembler](https://github.com/coreos/coreos-assembler/).It's recommended to use e.g. [a toolbox](https://github.com/containers/toolbox/) for development:
```bash
make && sudo make install
```Then you can run `osbuildbootc`.