Installation
This guide demonstrates the installation steps of ORAS CLI v1.2.2 on different platforms.
Homebrew
Install oras using Homebrew:
brew install oras
Snap
Install oras using Snap:
snap install oras --classic
Release artifacts
Install ORAS from the latest release artifacts:
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/')
VERSION="1.2.2"
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.2.2"
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/
ORAS on Homebrew is not maintained by the ORAS community, so it may not be the latest version.
Windows
- You can install ORAS CLI on Windows using WinGet (Windows Package Manager):
winget install oras --version 1.2.2
- Alternatively, you can install ORAS CLI from the
.ziprelease archive. Add%USERPROFILE%\bin\to yourPATHenvironment variable so thatoras.execan be found.
set "VERSION=1.2.2"
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%
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.2.2 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.2.2'
Run ORAS commands:
doras pull ghcr.io/$GH_USER/oras:darwin-amd64 --username $GH_USER --password $GHCR_TOKEN -o ./download
GitHub Actions
Use the oras CLI of the default version in GitHub Actions workflow using setup-oras:
steps:
- uses: oras-project/setup-oras@v1
- run: oras version
Reference the Advanced Usage to learn more.
Runner machine of Azure DevOps and GitHub Actions
ORAS CLI is also a built-in tool in some VM images for GitHub-hosted runners used for GitHub Actions, as well as for Microsoft-hosted agents used for Azure Pipelines. You can use ORAS CLI on these two operating system out of the box:
ORAS on runner images is not maintained by the ORAS community, so it may not be the latest version.
Nix
Nix is a tool that takes a unique approach to package management and system configuration.
The Nix Packages collection (Nixpkgs) is a set of over 80 000 packages for the Nix package manager.
oras also has a Nix package available in the Nixpkgs repository.
You can install nix CLI from here.
You can 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
$ oras version
Version: 1.2.2
Go version: go1.23.4
Git commit: 677529b4e7c38e3295e0883a2ee8a536e3a860f4
Git tree state: clean
You can check out our how-to guide if you would like to verify ORAS CLI Binaries.