Skip to content

NimTechnology

Trình bày các công nghệ CLOUD một cách dễ hiểu.

  • Kubernetes & Container
    • Docker
    • Kubernetes
      • Gateway API
      • Ingress
      • Pod
    • Helm Chart
    • OAuth2 Proxy
    • Isito-EnvoyFilter
    • Apache Kafka
      • Kafka
      • Kafka Connect
      • Lenses
    • Vault
    • Longhorn – Storage
    • VictoriaMetrics
    • MetalLB
    • Kong Gateway
  • CI/CD
    • ArgoCD
    • ArgoWorkflows
    • Argo Events
    • Spinnaker
    • Jenkins
    • Harbor
    • TeamCity
    • Git
      • Bitbucket
  • Coding
    • DevSecOps
    • Terraform
      • GCP – Google Cloud
      • AWS – Amazon Web Service
      • Azure Cloud
    • Golang
    • Laravel
    • Python
    • Jquery & JavaScript
    • Selenium
  • Log, Monitor & Tracing
    • DataDog
    • Prometheus
    • Grafana
    • ELK
      • Kibana
      • Logstash
  • BareMetal
    • NextCloud
  • Toggle search form

[ORAS] How to Easily and Effectively Upload Files to Docker Registry with ORAS

Posted on July 31, 2025July 31, 2025 By nim No Comments on [ORAS] How to Easily and Effectively Upload Files to Docker Registry with ORAS

Bọn mình sau khi thắc mắc có thể đẩy 1 file bất kỳ lên Docker registry không thì bạn Minh đã tìm ra 1 tool để làm việc này.
info của bạn: https://github.com/HaPhanBaoMinh

ORAS (OCI Registry As Storage) is an open-source tool that makes it easy to upload any file—not just container images—to OCI-compliant registries like Docker Hub, GitHub Container Registry, and Azure Container Registry. It’s cross-platform and lightweight, and using it to push files to a Docker registry takes just a few CLI commands. Here’s how you can guide your WordPress audience to get started:

Docker and Helm chỉ tập trung vào containers and charts.

Để lưu trữ các tạo tác mục đích chung như:

  • .zip archives
  • .pdf documents
  • .json configs
  • .wasm modules
  • …

Chúng ta cần một công cụ hỗ trợ nội dung tùy ý và các loại phương tiện tùy chỉnh. Đó là những gì ORAS làm.

Contents

Toggle
  • 1. Cài đặt ORAS
  • 2) ORAS login
  • 3) ORAS push artifact
  • 4) ORAS pull artifact

1. Cài đặt ORAS

Trên macOS:

brew install oras

trên windows:

winget install oras

Install on Linux:

VERSION="1.5.2"
curl -LO "https://github.com/oras-project/oras/releases/download/v${VERSION}/oras_${VERSION}_linux_amd64.tar.gz"
mkdir -p oras-install/
tar -zxf oras_${VERSION}_*.tar.gz -C oras-install/
sudo mv oras-install/oras /usr/local/bin/
rm -rf oras_${VERSION}_*.tar.gz oras-install/

2) ORAS login

oras login localhost:8080 -u robot\$user1 -p YAFxcZKPPARqhAa8GZylsDOIOkMZCJN3

WARNING! Using --password via the CLI is insecure. Use --password-stdin.
Login Succeeded

Explanation:

  • robot\$user1: Tạo tên tài khoản robot trong phiên Harbor
  • YAFxcZKPPARqhAa8GZylsDOIOkMZCJN3: Mật khẩu tài khoản robot

3) ORAS push artifact

oras push localhost:8080/2_6_0_pri/template:2_6_0 \
  --username "robot\$user1" \
  --password "YAFxcZKPPARqhAa8GZylsDOIOkMZCJN3" \
  2_6_0.zip:application/zip

OUTPUT:
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
✓ Exists    2_6_0.zip                                                                        34.9/34.9 kB 100.00%     0s
  └─ sha256:19e3e48a49d32c68f1d66c623fd1f8911c525557baff18d4605bbd338d3121bd
✓ Exists    application/vnd.oci.empty.v1+json                                                      2/2  B 100.00%     0s
  └─ sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a
✓ Uploaded  application/vnd.oci.image.manifest.v1+json                                         568/568  B 100.00%   52ms
  └─ sha256:831c695ee1830bb650de60df25be5c17d543b8a39f016d176835ffc69d1d6db8
Pushed [registry] localhost:8080/2_6_0_pri/template:2_6_0
ArtifactType: application/vnd.unknown.artifact.v1
Digest: sha256:831c695ee1830bb650de60df25be5c17d543b8a39f016d176835ffc69d1d6db8

Explanation:

  • localhost:8080: URL của kho chứa Harbor
  • 2_6_0_pri/template:2_6_0: project/repo:tag
  • 2_6_0.zip:application/zip: file path and media type
  • Robot account phải có push permission trên kho lưu trữ đó.

Common File Types and Media Types for ORAS:

File typeMedia typeDescription
.zipapplication/zipStandard compressed bundle
.jsonapplication/jsonConfiguration, structured data
.pdfapplication/pdfDocuments, specs
custom filesapplication/vnd.<yourorg>.<type>.v1+<format>Custom typed artifact (e.g., Helm, AI)

Bây giờ bạn có thể thấy chúng ta có cái Artifacts mới trong 2_6_0_pri/template

4) ORAS pull artifact

oras pull localhost:8080/2_6_0_pri/template:2_6_0 \
  --username "robot\$user1" \
  --password "YAFxcZKPPARqhAa8GZylsDOIOkMZCJN3"

OUTPUT:
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
✓ Pulled      2_6_0.zip                                                                      34.9/34.9 kB 100.00%    5ms
  └─ sha256:19e3e48a49d32c68f1d66c623fd1f8911c525557baff18d4605bbd338d3121bd
✓ Pulled      application/vnd.oci.image.manifest.v1+json                                       568/568  B 100.00%     0s
  └─ sha256:831c695ee1830bb650de60df25be5c17d543b8a39f016d176835ffc69d1d6db8
Pulled [registry] localhost:8080/2_6_0_pri/template:2_6_0
Digest: sha256:831c695ee1830bb650de60df25be5c17d543b8a39f016d176835ffc69d1d6db8
ls

OUTPUT:
2_6_0.zip

Explanation:

  • localhost:8080: Harbor registry URL
  • 2_6_0_pri/template:2_6_0: project/repo:tag
  • Robot account phải có pull permission trên repo repo.
Docker

Post navigation

Previous Post: [Grafana] Build a P99 chart using Prometheus and Grafana.
Next Post: [Argo Workflow] Set up initContainer in Argo Workflows

More Related Articles

[OnlyOffice/Collabora] Install open-source web-based office for NextCloud Docker
[Harbor] Install Private Docker Hub on Ubuntu Docker
[issue/alpine] docker 20.10.2 -> golang:1-alpine3.14 error: make: go: Operation not permitted Docker
[RabbitMQ] Installing RabbitMQ by Docker and Run RabbitMQ commands Docker
[Docker] Pulling unlimited public docker images Docker
[Docker build] How to bring id_rsa to the inside container when building the image? Docker

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Tham Gia Group DevOps nhé!
Để Nim có nhiều động lực ra nhiều bài viết.
Để nhận được những thông báo mới nhất.

Recent Posts

  • [Rancher/EKS] Rancher from v2.12.x can not work on eks cluster. April 15, 2026
  • [Telegram/Openclaw] Configure openclaw bot in a Telegram group. March 31, 2026
  • Tutorial: Gateway API + Traefik + oauth2-proxy (Microsoft Entra ID) March 30, 2026
  • Full + incremental backup: When restoring, do deleted files come back? March 27, 2026
  • [K8S] Create long-lived kubeconfig on k8s March 23, 2026

Archives

  • April 2026
  • March 2026
  • February 2026
  • January 2026
  • December 2025
  • November 2025
  • October 2025
  • September 2025
  • August 2025
  • July 2025
  • June 2025
  • May 2025
  • April 2025
  • March 2025
  • February 2025
  • January 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • July 2024
  • June 2024
  • May 2024
  • April 2024
  • March 2024
  • February 2024
  • January 2024
  • December 2023
  • November 2023
  • October 2023
  • September 2023
  • August 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023
  • March 2023
  • February 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021

Categories

  • AI
    • OpenClaw
  • BareMetal
    • NextCloud
  • CI/CD
    • Argo Events
    • ArgoCD
    • ArgoWorkflows
    • Git
      • Bitbucket
    • Harbor
    • Jenkins
    • Spinnaker
    • TeamCity
  • Coding
    • DevSecOps
    • Golang
    • Jquery & JavaScript
    • Laravel
    • NextJS 14 & ReactJS & Type Script
    • Python
    • Selenium
    • Terraform
      • AWS – Amazon Web Service
      • Azure Cloud
      • GCP – Google Cloud
  • Kubernetes & Container
    • Apache Kafka
      • Kafka
      • Kafka Connect
      • Lenses
    • Docker
    • Helm Chart
    • Isito-EnvoyFilter
    • Kong Gateway
    • Kubernetes
      • Gateway API
      • Ingress
      • Pod
    • Longhorn – Storage
    • MetalLB
    • OAuth2 Proxy
    • Vault
    • VictoriaMetrics
  • Log, Monitor & Tracing
    • DataDog
    • ELK
      • Kibana
      • Logstash
    • Fluent
    • Grafana
    • Prometheus
  • Uncategorized
  • Admin

Copyright © 2026 NimTechnology.