Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dennis-krasnov/buildah-rust
Wrapper around the Buildah CLI tool. For people who prefer Rust over Bash.
https://github.com/dennis-krasnov/buildah-rust
buildah container dockerfile oci rust
Last synced: 2 months ago
JSON representation
Wrapper around the Buildah CLI tool. For people who prefer Rust over Bash.
- Host: GitHub
- URL: https://github.com/dennis-krasnov/buildah-rust
- Owner: Dennis-Krasnov
- License: apache-2.0
- Created: 2021-07-02T00:20:18.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-07-04T21:16:33.000Z (over 3 years ago)
- Last Synced: 2024-08-08T17:17:48.449Z (6 months ago)
- Topics: buildah, container, dockerfile, oci, rust
- Language: Rust
- Homepage:
- Size: 20.5 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Buildah
Wrapper around the [Buildah](https://github.com/containers/buildah) CLI tool. For people who prefer Rust over Bash.
For more advanced use cases, use the buildah Go library itself.
## Example
```shell
cd examples
# Buildah Rust
cargo run --example nginx
podman run --rm -it -p 8080:80 nginx_rust# Buildah dockerfile
buildah bud -f nginx_dockerfile -t nginx_bud .
podman run --rm -it -p 8080:80 nginx_bud# Buildah Bash
chmod u+x nginx.sh
./nginx.sh
podman run --rm -it -p 8080:80 nginx_bash# Check that it worked:
buildah images
```## TODO
[] Validate image names[] Better error handling, better logging, panic if buildah isn't installed
[] Prelude: `use buildah::prelude::*;`
[] Publish on crates.io, ask `buildah` owner if I can have it, otherwise `buildah-rs`
[] Lots of commands and options are missing!
[] The trait `std::error::Error` is not implemented for `BuildahError`
[] Example with chrome tracing
[] https://rust-lang.github.io/api-guidelines/checklist.html
[] https://blog.guillaume-gomez.fr/articles/2020-03-12+Guide+on+how+to+write+documentation+for+a+Rust+crate
[] write docs on how to run this on a macos/windows machine
// 1) locally, `cargo build --release --package build_oci_images`
// 2) docker run --rm -v "$PWD":/app -w /app -e IMAGE_TAG=latest buildah/buildah buildah unshare target/release/build_oci_images
// https://insujang.github.io/2020-11-09/building-container-image-inside-container-using-buildah/
// https://developers.redhat.com/blog/2019/08/14/best-practices-for-running-buildah-in-a-container#running_buildah_inside_a_container## License
Licensed under Apache License, Version 2.0.
#### Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
licensed as above, without any additional terms or conditions.