Azure Container Registry SDK for Python
Azure Container Registry Python SDK
공식 Python SDK 를 사용하여 Azure Container Registry 에서 컨테이너 이미지와 아티팩트를 관리하세요. 이 스킬은 인증, 리포지토리 작업 및 아티팩트 관리를 위한 즉시 사용 가능한 코드 예제를 제공합니다.
تنزيل ZIP المهارة
رفع في Claude
اذهب إلى Settings → Capabilities → Skills → Upload skill
فعّل وابدأ الاستخدام
اختبرها
استخدام "Azure Container Registry SDK for Python". ACR 에서 리포지토리 목록 조회
النتيجة المتوقعة:
```python
from azure.containerregistry import ContainerRegistryClient
from azure.identity import DefaultAzureCredential
client = ContainerRegistryClient(
endpoint="https://myregistry.azurecr.io",
credential=DefaultAzureCredential()
)
for repository in client.list_repository_names():
print(repository)
```
استخدام "Azure Container Registry SDK for Python". 오래된 이미지 정리
النتيجة المتوقعة:
```python
from datetime import datetime, timedelta, timezone
cutoff = datetime.now(timezone.utc) - timedelta(days=30)
for manifest in client.list_manifest_properties("my-image"):
if manifest.last_updated_on < cutoff and not manifest.tags:
print(f"Deleting {manifest.digest}")
client.delete_manifest("my-image", manifest.digest)
```
التدقيق الأمني
آمنThis is a documentation-only skill containing reference material and code examples for the Azure Container Registry Python SDK. No executable code, scripts, or dangerous patterns were detected. The skill provides static reference content for SDK usage and presents no security risks.
درجة الجودة
ماذا يمكنك بناءه
CI/CD 파이프라인을 관리하는 DevOps 엔지니어
배포 워크플로의 일부로 ACR 에서 컨테이너 이미지 조회 및 관리
컨테이너 이미지로 작업하는 개발자
리포지토리 목록 조회, 이미지 메타데이터 검사 및 개발 프로젝트용 태그 관리
레지스트리 위생을 유지하는 플랫폼 엔지니어
오래된 이미지를 정리하고 컨테이너 레지스트리의 보관 정책 관리
جرّب هذه الموجهات
How do I list all repositories in my Azure Container Registry using the Python SDK?
Show me how to authenticate to Azure Container Registry using DefaultAzureCredential in Python
Write Python code to delete container images older than 30 days from Azure Container Registry
How do I download a container manifest and its blob layers from ACR using the Python SDK?
أفضل الممارسات
- 프로덕션 환경에서는 자격 증명을 저장하는 대신 인증을 위해 Entra ID(DefaultAzureCredential) 를 사용하세요
- 실수로 삭제하는 것을 방지하기 위해 프로덕션 이미지를 can_delete=False 로 잠그세요
- 태그 없는 이미지를 방지하기 위해 태그 대신 다이제스트로 삭제하세요
تجنب
- 관리형 ID 를 사용하는 대신 소스 코드에 자격 증명을 하드코딩하기
- 동일한 다이제스트를 가리키는 다른 태그가 있는지 확인하지 않고 태그로 이미지 삭제하기
- 비동기가 더 효율적인 대용량 작업에서 동기 클라이언트 사용하기
الأسئلة المتكررة
Azure Container Registry 에 어떻게 인증하나요?
MCR 과 같은 공개 레지스트리에 액세스할 수 있나요?
오래된 이미지를 안전하게 삭제하려면 어떻게 하나요?
동기 클라이언트와 비동기 클라이언트의 차이점은 무엇인가요?
삭제를 방지하기 위해 이미지를 잠그려면 어떻게 하나요?
이 스킬이 Azure 리소스를 생성하나요?
تفاصيل المطور
المؤلف
sickn33الترخيص
MIT
المستودع
https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/azure-containerregistry-pyمرجع
main
بنية الملفات
📄 SKILL.md