| Crates.io | oci-r2-uploader |
| lib.rs | oci-r2-uploader |
| version | 0.1.2 |
| created_at | 2023-04-23 12:30:33.460801+00 |
| updated_at | 2023-04-23 15:53:24.563065+00 |
| description | Rust library for converting and uploading Docker images to Cloudflare R2 Storage with customizable image and tag parameters. |
| homepage | |
| repository | https://github.com/smileostrich/oci-r2-uploader.git |
| max_upload_size | |
| id | 846520 |
| size | 11,131 |
Rust library for converting and uploading Docker images to Cloudflare R2 Storage with customizable image and tag parameters.
Add the following dependency to your Cargo.toml file:
[dependencies]
oci-r2-uploader = "0.1.2"
Install skopeo on your system. Follow the official installation instructions for your specific platform.
(if you are using macOS, you can install it with brew install skopeo)
You need to set the following environment variables:
export CLOUDFLARE_ACCOUNT_ID=account_id
export R2_ACCESS_KEY_ID=access_key
export R2_SECRET_ACCESS_KEY=secret_key
export R2_BUCKET=my_bucket
use oci_r2_uploader;
#[tokio::main]
async fn main() {
let image = String::from("my_image");
let tag = String::from("my_tag");
if let Err(e) = oci_r2_uploader::run(image, tag).await {
}
}
This project is licensed under the MIT License.