Installation
This guide demonstrates the installation steps of ORAS CLI on different platforms.
Homebrew
Install oras using Homebrew on macOS and Linux:
brew install oras
ORAS on Homebrew is not maintained by the ORAS community, so it may not be the latest version.
Snap
Install oras using Snap on Linux:
snap install oras --classic
The --classic flag is required because ORAS uses classic confinement to access files outside the snap sandbox.
Release artifacts
Install ORAS from the latest release artifacts:
For macOS and Linux type operating systems, you can determine operating system and architecture using uname:
OS="$(uname -s | tr A-Z a-z)"
ARCH=$(uname -m | sed -e 's/x86_64/amd64/' -e 's/aarch64/arm64/' -e 's/armv7l/armv7/' -e 's/loongarch64/loong64/')
VERSION="1.3.6"
curl -fLO "https://github.com/oras-project/oras/releases/download/v${VERSION}/oras_${VERSION}_${OS}_${ARCH}.tar.gz"
mkdir -p oras-install/
tar -zxf oras_${VERSION}_${OS}_${ARCH}.tar.gz -C oras-install/
sudo chown root:0 oras-install/oras
sudo mv oras-install/oras /usr/local/bin/
rm -rf oras_${VERSION}_${OS}_${ARCH}.tar.gz oras-install/
Linux
To install ORAS on Linux, run the following command:
ARCH=$(uname -m | sed -e 's/x86_64/amd64/' -e 's/aarch64/arm64/' -e 's/armv7l/armv7/' -e 's/loongarch64/loong64/')
VERSION="1.3.6"
curl -fLO "https://github.com/oras-project/oras/releases/download/v${VERSION}/oras_${VERSION}_linux_${ARCH}.tar.gz"
mkdir -p oras-install/
tar -zxf oras_${VERSION}_linux_${ARCH}.tar.gz -C oras-install/
sudo mv oras-install/oras /usr/local/bin/
rm -rf oras_${VERSION}_linux_${ARCH}.tar.gz oras-install/
macOS
To install ORAS on a Mac computer, run the following command:
ARCH=$(uname -m | sed -e 's/x86_64/amd64/')
VERSION="1.3.6"
curl -fLO "https://github.com/oras-project/oras/releases/download/v${VERSION}/oras_${VERSION}_darwin_${ARCH}.tar.gz"
mkdir -p oras-install/
tar -zxf oras_${VERSION}_darwin_${ARCH}.tar.gz -C oras-install/
sudo mv oras-install/oras /usr/local/bin/
rm -rf oras_${VERSION}_darwin_${ARCH}.tar.gz oras-install/
Windows
You can install ORAS CLI on Windows using WinGet (Windows Package Manager):
winget install oras --version 1.3.6
Alternatively, you can install ORAS CLI from the .zip release archive. Add %USERPROFILE%\bin\ to your PATH environment variable so that oras.exe can be found.
set "VERSION=1.3.6"
curl.exe -fLO "https://github.com/oras-project/oras/releases/download/v%VERSION%/oras_%VERSION%_windows_amd64.zip"
tar.exe -xvzf oras_%VERSION%_windows_amd64.zip
if not exist "%USERPROFILE%\bin" mkdir "%USERPROFILE%\bin"
copy /Y oras.exe "%USERPROFILE%\bin\oras.exe"
set PATH=%USERPROFILE%\bin\;%PATH%
Go Install
If you have Go 1.26.7 or later installed, you can install ORAS CLI using go install:
go install oras.land/oras/cmd/oras@v1.3.6
The oras binary will be installed in the directory specified by the GOBIN environment variable, which defaults to $GOPATH/bin or $HOME/go/bin if the GOPATH environment variable is not set. You may need to add this directory to your PATH environment variable to run oras from any location.
Docker Image
A public Docker image containing the CLI is available on GitHub Container Registry:
docker run -it --rm -v $(pwd):/workspace ghcr.io/oras-project/oras:v1.3.6 help
The default WORKDIR in the image is /workspace.
You can use the Docker image locally instead of installing a binary. For example create an alias:
alias doras='docker run -it --rm -v $(pwd):/workspace ghcr.io/oras-project/oras:v1.3.6'
Run ORAS commands:
doras pull ghcr.io/$GH_USER/oras:darwin-amd64 --username $GH_USER --password $GHCR_TOKEN -o ./download
GitHub Actions
Install ORAS CLI in a GitHub Actions workflow using setup-oras:
steps:
- uses: oras-project/setup-oras@v2
with:
version: 1.3.6
- run: oras version
If you omit version, the action installs its default ORAS CLI version.
Reference the Advanced Usage to learn how to install from a custom URL.
Runner images for GitHub Actions and Azure Pipelines
ORAS CLI is also a built-in tool in the Ubuntu 22.04 VM image for GitHub-hosted runners used for GitHub Actions, as well as for Microsoft-hosted agents used for Azure Pipelines.
ORAS on runner images is not maintained by the ORAS community, so it may not be the latest version.
Nix
ORAS CLI is available as a Nix package in the Nix Packages collection (Nixpkgs).
After you install Nix, install oras using the following command:
nix-env -iA nixpkgs.oras
ORAS on Nix is not maintained by the ORAS community, so it may not be the latest version.
Verify
Your Go version, OS/Arch and Git commit may vary depending on what you have downloaded:
$ oras version
Version: 1.3.6
Go version: go1.26.9
OS/Arch: linux/amd64
Git commit: 9b1fc815f6b7fba743f08b9b5c5846639cc11d3c
Git tree state: clean
You can check out our how-to guide if you would like to verify ORAS CLI Binaries.