OCI transport plugin for apt-get (i.e., apt-get over ghcr.io)
Go
119
38 commits
updated Jul 20, 2026
apt-get (i.e., apt-get over ghcr.io)apt-transport-oci is an apt-get plugin to support distributing *.deb packages over an OCI registry such as ghcr.io .
[!NOTE] "OCI" here refers to the "Open Container Initiative", not to the "Oracle Cloud Infrastructure".
The motivation is to distribute *.deb packages without running a web server but using a popular fully-managed service such as ghcr.io.
If GitHub could offer fully-managed apt repo, this plugin wouldn't be needed.
The apt-transport-oci plugin is officially packaged in Debian and Ubuntu,
since Debian 14 and Ubuntu 26.04.
sudo apt install apt-transport-oci
sudo go build -o /usr/lib/apt/methods/oci ./cmd/usr-lib-apt-methods-oci
The following example installs the hello-apt-transport-oci package from the oci://ghcr.io/akihirosuda/apt-transport-oci-examples:latest image.
[!TIP] See https://github.com/AkihiroSuda/apt-transport-oci-examples for how to build and push this package to your own registry.
/etc/apt/sources.list.d/oci.sources with the following content:Types: deb
URIs: oci://ghcr.io/akihirosuda/apt-transport-oci-examples:latest
Suites: stable
Components: main
Signed-By: /etc/apt/keyrings/apt-transport-oci-examples.gpg
curl -fsSL https://raw.githubusercontent.com/AkihiroSuda/apt-transport-oci-examples/refs/heads/master/apt-transport-oci-examples.gpg \
| sudo gpg --dearmor -o /etc/apt/keyrings/apt-transport-oci-examples.gpg
sudo apt update
sudo apt install hello-apt-transport-oci
hello-apt-transport-oci is installed$ hello-apt-transport-oci
Hello, apt-transport-oci
/root/.docker/config.json to enable authentication.apt-get -o Debug::pkgAcquire::Worker=1 update 2>&1 and grep FailReasonThe spec corresponds to the behavior of oras push --image-spec=v1.0 IMAGE FILE1:application/octet-stream FILE2:application/octet-stream ....
apt-get itself supports multi-arch repo).org.opencontainers.image.title annotation that corresponds to the file name.application/octet-streamapplication/x-binaryGo
100.0%
OCI transport plugin for apt-get (i.e., apt-get over ghcr.io)
Go
119
38 commits
updated Jul 20, 2026
apt-get (i.e., apt-get over ghcr.io)apt-transport-oci is an apt-get plugin to support distributing *.deb packages over an OCI registry such as ghcr.io .
[!NOTE] "OCI" here refers to the "Open Container Initiative", not to the "Oracle Cloud Infrastructure".
The motivation is to distribute *.deb packages without running a web server but using a popular fully-managed service such as ghcr.io.
If GitHub could offer fully-managed apt repo, this plugin wouldn't be needed.
The apt-transport-oci plugin is officially packaged in Debian and Ubuntu,
since Debian 14 and Ubuntu 26.04.
sudo apt install apt-transport-oci
sudo go build -o /usr/lib/apt/methods/oci ./cmd/usr-lib-apt-methods-oci
The following example installs the hello-apt-transport-oci package from the oci://ghcr.io/akihirosuda/apt-transport-oci-examples:latest image.
[!TIP] See https://github.com/AkihiroSuda/apt-transport-oci-examples for how to build and push this package to your own registry.
/etc/apt/sources.list.d/oci.sources with the following content:Types: deb
URIs: oci://ghcr.io/akihirosuda/apt-transport-oci-examples:latest
Suites: stable
Components: main
Signed-By: /etc/apt/keyrings/apt-transport-oci-examples.gpg
curl -fsSL https://raw.githubusercontent.com/AkihiroSuda/apt-transport-oci-examples/refs/heads/master/apt-transport-oci-examples.gpg \
| sudo gpg --dearmor -o /etc/apt/keyrings/apt-transport-oci-examples.gpg
sudo apt update
sudo apt install hello-apt-transport-oci
hello-apt-transport-oci is installed$ hello-apt-transport-oci
Hello, apt-transport-oci
/root/.docker/config.json to enable authentication.apt-get -o Debug::pkgAcquire::Worker=1 update 2>&1 and grep FailReasonThe spec corresponds to the behavior of oras push --image-spec=v1.0 IMAGE FILE1:application/octet-stream FILE2:application/octet-stream ....
apt-get itself supports multi-arch repo).org.opencontainers.image.title annotation that corresponds to the file name.application/octet-streamapplication/x-binaryGo
100.0%