Web Analytics

oci2git

⭐ 384 stars Assamese by Virviil

🌐 ভাষা

OCI2Git

[Documentation][documentation] Crates.io License

ডাউনলোড

[//]: # (ভৱিষ্যতৰ test.yaml ৰ বাবে mock) [//]: # ([![Test Status](https://img.shields.io/github/actions/workflow/status/Virviil/oci2git/rust.yml?branch=master&event=push&label=Test)](https://github.com/Virviil/oci2git/actions))

এখন Rust এপ্লিকেচন, যি container image (Docker, আদি) Git repository লৈ ৰূপান্তৰ কৰে। প্রতিটো container layer Git commit হিচাপে প্ৰতিনিধিত্ব কৰে, মূল image ৰ ইতিহাস আৰু গঠন সংৰক্ষণ কৰে।

OCI2Git এ nginx image ৰূপান্তৰৰ ডেমো

বৈশিষ্ট্যসমূহ

ব্যৱহাৰৰ ক্ষেত্ৰসমূহ

Layer Diffing

Container সমস্যাৰ troubleshooting কৰোঁতে, Git ৰ শক্তিশালী diffing ক্ষমতা ব্যৱহাৰ কৰি যিকোনো দুটা layer ৰ মাজত কি পৰিবৰ্তন হৈছে ঠিককৈ চিনাক্ত কৰিব পাৰি। git diff commit ৰ মাজত চলালে, ইঞ্জিনিয়াৰসকলে স্পষ্টকৈ চাব পাৰে কোন ফাইল যোগ, সংশোধন বা মচি পেলোৱা হৈছে, যাৰ দ্বাৰা প্ৰত্যেক Dockerfile instruction ৰ প্ৰভাৱ বুজা সহজ হয় আৰু সমস্যা থকা পৰিবৰ্তন চাব পাৰি। layer diff ৰ উদাহৰণ

Origin Tracking

git blame ব্যৱহাৰ কৰি, ডেভেলপাৰসকলে দ্রুতকৈ চাব পাৰে কোন layer এ নিৰ্দিষ্ট ফাইল বা কোডৰ line আনিছে। বিশেষকৈ configuration file বা dependency ৰ সমস্যাৰ নিৰ্ণয়ত এইটো মূল্যবান। প্রতিটো layer manually পৰীক্ষা নকৰি, যিকোনো ফাইলৰ উৎস layer আৰু Dockerfile instruction সহজে চাব পাৰি।

File Lifecycle Tracking

OCI2Git এ আপোনাক container image ৰ ইতিহাসত নিৰ্দিষ্ট ফাইলৰ যাত্ৰা অনুসৰণ কৰিবলৈ সক্ষম কৰে। কোন সময়ত ফাইলটো সৃষ্টি হৈছিল, কিদৰে বিভিন্ন layerত সংশোধন হৈছিল, আৰু কেতিয়া মচি পেলোৱা হৈছিল - সকলো চাব পাৰি। এই বিস্তৃত দৃশ্যই বহু layerৰ মাজত নিজে নিজে পৰিবৰ্তন অনুসৰণ নকৰাকৈ ফাইল evolution বুজিবলৈ সহায় কৰে।

আপোনাৰ container image ৰ ভিতৰত এজন ফাইলৰ ইতিহাস অনুসৰণ কৰিবলৈ — কেতিয়া সৃষ্টি, পৰিবৰ্তিত, বা মচি পেলোৱা হৈছিল — ৰূপান্তৰৰ পাছত এই Git command সমূহ ব্যৱহাৰ কৰিব পাৰি:

# Full history of a file (including renames)
git log --follow -- /rootfs/my/file/path

First appearance (i.e. creation) - see which layer introduced the file

git log --diff-filter=A -- /rootfs/my/file/path

All changes made to the file (with diffs)

git log -p --follow -- /rootfs/my/file/path

When the file was deleted

git log --diff-filter=D -- /rootfs/my/file/path

Show short commit info (concise layer history)

git log --follow --oneline -- /rootfs/my/file/path

এই আদেশবোৰে যিকোনো ফাইলৰ সম্পূৰ্ণ ইতিহাসক কন্টেইনাৰ স্তৰৰ মাজেৰে সহজে অনুসৰণ কৰিবলৈ সক্ষম কৰে, স্তৰৰ টাৰবলসমূহ ম্যানুৱেলিভাৱে উলিয়াই তুলনা কৰাৰ জটিলতা নাথাকে।

বহু-স্তৰ বিশ্লেষণ

কেতিয়াবা আটাইতকৈ গুৰুত্বপূর্ণ তুলনাবোৰ বহু অপৰ্যায়ী স্তৰৰ পৰিৱর্তন পৰীক্ষা কৰাৰ পৰা আহে। OCI2Git ব্যৱহাৰ কৰি, আপোনোৱে Git ৰ তুলনামূলক টুলসমূহ ব্যৱহাৰ কৰি বহু নিৰ্মাণ স্তৰৰ মাজত উপাদানসমূহ কেনেদৰে বিকাশ হৈছে বিশ্লেষণ কৰিব পাৰে, যি ধৰণৰ ধাৰণা কেৱল সংলগ্ন স্তৰৰ ক্ষেত্ৰত দেখিবলৈ নোৱাৰা।

স্তৰ অন্বেষণ

git checkout ব্যৱহাৰ কৰি যিকোনো নিৰ্দিষ্ট কমিটলৈ গতি কৰিলে, আপুনি কন্টেইনাৰৰ ফাইল চিস্টেম ঠিক সেই স্তৰত যিদৰে আছিল পৰীক্ষা কৰিব পাৰে। এইটো ডেভেলপাৰসকলক ছবিৰ সৃষ্টি প্ৰক্ৰিয়াৰ যিকোনো বিন্দুত ফাইল আৰু ডাইৰেক্টৰীৰ নিৰ্দিষ্ট অৱস্থা পৰীক্ষা কৰিবলৈ সক্ষম কৰে, যি ডিবাগিং বা কন্টেইনাৰৰ আচৰণ পৰীক্ষা কৰোঁতে অমূল্য প্ৰেক্ষাপট যোগান ধৰিছে। পূৰ্বৰ কমিটলৈ চেকআউট

বহু-ছবি বিশ্লেষণ

যেতিয়া একাধিক কন্টেইনাৰ ছবিত সাধাৰণ বংশধৰ থাকে, OCI2Git কেৱল ছবিসমূহ প্ৰকৃততে বিভাজিত হ'লে ব্রাঞ্চ সৃষ্টি কৰে। এইটো আপোনাক একেটা ৰেপজিটৰিত বহু সম্পৰ্কিত ছবি বিশ্লেষণ কৰিবলৈ সক্ষম কৰে আৰু তেওঁলোকৰ সাধাৰণ ইতিহাস সংৰক্ষণ কৰে।

# Convert first image to create the base repository
oci2git postgres:16.9-alpine3.21 -o alp

Convert second image to the same output folder

oci2git nginx:1.28.0-alpine-slim -o alp
OCI2Git স্বয়ংক্ৰিয়ভাৱে ছবিসমূহৰ মাজত শ্বেয়াৰ কৰা স্তৰসমূহ চিনাক্ত কৰে আৰু এটি শাখাবদ্ধ গঠন সৃষ্টি কৰে যি তেওঁলোকৰ সাধাৰণ আধাৰক প্ৰতিফলিত কৰে। Git ইতিহাসত দেখা যাব: এই পদ্ধতিটো বিশেষভাৱে মূল্যবান: শ্বেয়াৰ কৰা আধাৰ আৰু বিভাজিত শাখাৰ সৈতে বহু-ছবি ৰেপ’জিট’ৰি গঠন

অতিৰিক্ত ব্যৱহাৰ ক্ষেত্ৰ

ইনষ্টলেশ্বন

পেকেজ মেনেজাৰসমূহ

#### macOS / Linux (Homebrew)

brew tap virviil/oci2git
brew install oci2git

#### ডেবিয়ান / উবুন্টু

সৰ্বশেষ মুক্তিৰ পৰা .deb পেকেজটো ডাউনলোড কৰি ইনষ্টল কৰক:

# For amd64 (x86_64)
wget https://github.com/virviil/oci2git/releases/latest/download/oci2git_VERSION_amd64.deb
sudo dpkg -i oci2git_VERSION_amd64.deb

For arm64

wget https://github.com/virviil/oci2git/releases/latest/download/oci2git_VERSION_arm64.deb sudo dpkg -i oci2git_VERSION_arm64.deb

#### আৰ্চ লিনাক্স (AUR)

# Using yay
yay -S oci2git-bin

Using paru

paru -S oci2git-bin

Manual installation

git clone https://aur.archlinux.org/oci2git-bin.git cd oci2git-bin makepkg -si

আগতে নিৰ্মিত বাইনেৰিসমূহ

আপোনাৰ প্লেটফৰ্মৰ বাবে উপযুক্ত বাইনেৰীটো সৰ্বশেষ ৰিলিজৰ পৰা ডাউনলোড কৰক:

# Linux x86_64
wget https://github.com/virviil/oci2git/releases/latest/download/oci2git-linux-x86_64.tar.gz
tar xzf oci2git-linux-x86_64.tar.gz
sudo mv oci2git-linux-x86_64 /usr/local/bin/oci2git
chmod +x /usr/local/bin/oci2git

macOS (Apple Silicon)

wget https://github.com/virviil/oci2git/releases/latest/download/oci2git-darwin-aarch64.tar.gz tar xzf oci2git-darwin-aarch64.tar.gz sudo mv oci2git-darwin-aarch64 /usr/local/bin/oci2git chmod +x /usr/local/bin/oci2git

Crates.io ৰ পৰা

cargo install oci2git

উৎসৰ পৰা

# Clone the repository
git clone https://github.com/virviil/oci2git.git
cd oci2git

Install locally

cargo install --path .

ব্যৱহাৰ

oci2git [OPTIONS] 

আৰ্গুমেন্টসমূহ: ৰূপান্তৰ কৰিবলৈ ছবি নাম (উদাহৰণস্বৰূপে, 'ubuntu:latest') অথবা টাৰ ইঞ্জিন ব্যৱহাৰ কৰাৰ সময়ত টাৰবলৰ পথ

বিকল্পসমূহ: -o, --output গিট ৰেপ'জিটৰীৰ বাবে আউটপুট ডাইৰেক্টৰি [ডিফল্ট: ./container_repo] -e, --engine ব্যৱহাৰ কৰিবলৈ কণ্টেইনাৰ ইঞ্জিন (docker, nerdctl, tar) [ডিফল্ট: docker] -h, --help সহায় তথ্য ছাপ কৰক -V, --version সংস্কৰণ তথ্য ছাপ কৰক

পৰিবেশ ভেৰিয়েব্‌লসমূহ: TMPDIR ইন্টাৰমিডিয়েট ডাটা প্ৰসেছিংৰ বাবে ডিফল্ট স্থান সলনি কৰিবলৈ এই পৰিবেশ ভেৰিয়েব্‌লটো ছেট কৰক। এইটো প্লেটফৰ্ম-নির্ভৰ (উদাহৰণস্বৰূপে, ইউনিক্স/মেক'ত TMPDIR, উইণ্ড'জত TEMP বা TMP)।

উদাহৰণসমূহ

ডকৰ ইঞ্জিন ব্যৱহাৰ কৰি (ডিফল্ট):

oci2git -o ./ubuntu-repo ubuntu:latest
আজি ডাউনলোড কৰা ইমেজ টাৰবল ব্যৱহাৰ কৰি:

oci2git -e tar -o ./ubuntu-repo /path/to/ubuntu-latest.tar

টাৰ ইঞ্জিনে এটা বৈধ OCI ফৰ্মেট টাৰবল আশা কৰে, যি সাধাৰণতে docker save ব্যৱহাৰ কৰি সৃষ্টি কৰা হয়:

# Create a tarball from a local Docker image
docker save -o ubuntu-latest.tar ubuntu:latest

Convert the tarball to a Git repository

oci2git -e tar -o ./ubuntu-repo ubuntu-latest.tar

এইটো ./ubuntu-repo-ত এটা Git ৰেপ'জিট'ৰি সৃষ্টি কৰিব:

Git-ৰ ইতিহাসত কণ্টেইনাৰৰ লেয়াৰ ইতিহাস প্ৰদর্শিত হয়:

ৰেপ'জিট'ৰি গঠন

repository/
├── .git/
├── Image.md     # Complete image metadata
└── rootfs/      # Filesystem content from the container

আৱশ্যকতাসমূহ

লাইচেঞ্চ

MIT

[ডকুমেণ্টেশ্বন]: https://docs.rs/oci2git/

--- Tranlated By Open Ai Tx | Last indexed: 2026-01-30 ---