Crates.io | buildah-rs |
lib.rs | buildah-rs |
version | 0.3.0 |
source | src |
created_at | 2021-07-03 20:07:17.763128 |
updated_at | 2021-07-04 21:18:11.317763 |
description | Wrapper around the Buildah CLI tool. For people who prefer Rust over Bash. |
homepage | https://github.com/Dennis-Krasnov/Buildah-Rust |
repository | https://github.com/Dennis-Krasnov/Buildah-Rust |
max_upload_size | |
id | 418321 |
size | 29,703 |
Wrapper around the Buildah CLI tool. For people who prefer Rust over Bash.
For more advanced use cases, use the buildah Go library itself.
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
[] 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
[] 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
Licensed under Apache License, Version 2.0.
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.