1"use strict";(globalThis.webpackChunkoras_www||=[]).push([[5372],{4881(e,r,s){s.r(r),s.d(r,{assets:()=>i,contentTitle:()=>a,default:()=>d,frontMatter:()=>o,metadata:()=>t,toc:()=>c});const t=JSON.parse('{"id":"commands/oras_pull","title":"oras pull","description":"Pull files from a registry or an OCI image layout","source":"@site/versioned_docs/version-1.2/commands/oras_pull.mdx","sourceDirName":"commands","slug":"/commands/oras_pull","permalink":"/docs/1.2/commands/oras_pull","draft":false,"unlisted":false,"editUrl":"https://github.com/oras-project/oras-www/edit/main/versioned_docs/version-1.2/commands/oras_pull.mdx","tags":[],"version":"1.2","sidebarPosition":140,"frontMatter":{"title":"oras pull","sidebar_position":140,"warning":"Do NOT modify this generated file"},"sidebar":"tutorialSidebar","previous":{"title":"oras manifest push","permalink":"/docs/1.2/commands/oras_manifest_push"},"next":{"title":"oras push","permalink":"/docs/1.2/commands/oras_push"}}');var n=s(74848),l=s(28453);const o={title:"oras pull",sidebar_position:140,warning:"Do NOT modify this generated file"},a="oras pull",i={},c=[{value:"Examples",id:"examples",level:2},{value:"Options",id:"options",level:2}];function u(e){const r={code:"code",h1:"h1",h2:"h2",header:"header",p:"p",pre:"pre",...(0,l.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.header,{children:(0,n.jsx)(r.h1,{id:"oras-pull",children:"oras pull"})}),"\n",(0,n.jsx)(r.p,{children:"Pull files from a registry or an OCI image layout"}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:"oras pull [flags] <name>{:<tag>|@<digest>}\n"})}),"\n",(0,n.jsx)(r.h2,{id:"examples",children:"Examples"}),"\n",(0,n.jsx)(r.p,{children:"Pull artifact files from a registry:"}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:"oras pull localhost:5000/hello:v1\n"})}),"\n",(0,n.jsx)(r.p,{children:"Recursively pulling all files from a registry, including subjects of hello:v1:"}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:"oras pull --include-subject localhost:5000/hello:v1\n"})}),"\n",(0,n.jsx)(r.p,{children:"Pull files from an insecure registry:"}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:"oras pull --insecure localhost:5000/hello:v1\n"})}),"\n",(0,n.jsx)(r.p,{children:"Pull files from the HTTP registry:"}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:"oras pull --plain-http localhost:5000/hello:v1\n"})}),"\n",(0,n.jsx)(r.p,{children:"Pull files from a registry with local cache:"}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:"export ORAS_CACHE=~/.oras/cache\noras pull localhost:5000/hello:v1\n"})}),"\n",(0,n.jsx)(r.p,{children:"Pull files from a registry with certain platform:"}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:"oras pull --platform linux/arm/v5 localhost:5000/hello:v1\n"})}),"\n",(0,n.jsx)(r.p,{children:"Pull all files with concurrency level tuned:"}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:"oras pull --concurrency 6 localhost:5000/hello:v1\n"})}),"\n",(0,n.jsx)(r.p,{children:"[Experimental] Pull files and format output in JSON:"}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:"oras pull localhost:5000/hello:v1 --format json\n"})}),"\n",(0,n.jsx)(r.p,{children:"[Experimental] Pull files and format output with Go template:"}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'oras pull localhost:5000/hello:v1 --format go-template="{{.reference}}"\n'})}),"\n",(0,n.jsx)(r.p,{children:"Pull artifact files from an OCI image layout folder 'layout-dir':"}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:"oras pull --oci-layout layout-dir:v1\n"})}),"\n",(0,n.jsx)(r.p,{children:"Pull artifact files from an OCI layout archive 'layout.tar':"}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:"oras pull --oci-layout layout.tar:v1\n"})}),"\n",(0,n.jsx)(r.h2,{id:"options",children:"Options"}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{children:" -T, --allow-path-traversal allow storing files out of the output directory\n --ca-file string server certificate authority file for the remote registry\n --cert-file string client certificate file for the remote registry\n --concurrency int concurrency level (default 3)\n --config string output manifest config file\n -d, --debug output debug logs (implies --no-tty)\n --format str
1ing [Experimental] Format output using a custom template:\n 'json': Print in JSON format\n 'go-template': Print output using the given Go template\n -H, --header stringArray add custom headers to requests\n -h, --help help for pull\n --identity-token string registry identity token\n --identity-token-stdin read identity token from stdin\n --include-subject [Preview] recursively pull the subject of artifacts\n --insecure allow connections to SSL registry without certs\n -k, --keep-old-files do not replace existing files when pulling, treat them as errors\n --key-file string client private key file for the remote registry\n --no-tty [Preview] do not show progress output\n --oci-layout set target as an OCI image layout\n -o, --output string output directory (default \".\")\n -p, --password string registry password or identity token\n --password-stdin read password from stdin\n --plain-http allow insecure connections to registry without SSL check\n --platform os[/arch][/variant][:os_version] request platform in the form of os[/arch][/variant][:os_version]\n --registry-config path path of the authentication file for registry\n --resolve host:port:address[:address_port] customized DNS for registry, formatted in host:port:address[:address_port]\n --template string [Experimental] Template string used to format output\n -u, --username string registry username\n -v, --verbose verbose output\n"})})]})}function d(e={}){const{wrapper:r}={...(0,l.R)(),...e.components};return r?(0,n.jsx)(r,{...e,children:(0,n.jsx)(u,{...e})}):u(e)}},28453(e,r,s){s.d(r,{R:()=>o,x:()=>a});var t=s(96540);const n={},l=t.createContext(n);function o(e){const r=t.useContext(l);return t.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function a(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:o(e.components),t.createElement(l.Provider,{value:r},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.