OCI transport plugin for apt-get (i.e., apt-get over ghcr.io)

apt-transport-oci: OCI transport plugin for 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 .

Motivation

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.

Usage

  • Install the apt-transport-oci plugin onto /usr/lib/apt/methods/oci:
sudo go build -o /usr/lib/apt/methods/oci ./cmd/usr-lib-apt-methods-oci
deb [trusted=yes] oci://ghcr.io/akihirosuda/hello-apt-transport-oci:latest /
  • Run sudo apt-get update && sudo apt-get install hello-apt-transport-oci
$ sudo apt-get update
...
Get:7 oci://ghcr.io/akihirosuda/hello-apt-transport-oci:latest  Packages [478 B]
...
Reading package lists... Done
$ sudo apt-get install hello-apt-transport-oci
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  hello-apt-transport-oci
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 1,106 B of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 oci://ghcr.io/akihirosuda/hello-apt-transport-oci:latest  hello-apt-transport-oci 0.0 [1,106 B]
Selecting previously unselected package hello-apt-transport-oci.
(Reading database ... 249739 files and directories currently installed.)
Preparing to unpack .../hello-apt-transport-oci_0.0_amd64.deb ...
Unpacking hello-apt-transport-oci (0.0) ...
Setting up hello-apt-transport-oci (0.0) ...
  • Make sure hello-apt-transport-oci is installed
$ hello-apt-transport-oci
Hello, apt-transport-oci

Hints

  • Create /root/.docker/config.json to enable authentication.
  • Non-TLS registry is supported only for 127.0.0.1
  • Troubleshooting: Run apt-get -o Debug::pkgAcquire::Worker=1 update 2>&1 and grep FailReason

Creating an apt repo

See ./examples .

Specification

The spec corresponds to the behavior of oras push IMAGE FILE1:application/octet-stream FILE2:application/octet-stream ... (ORAS v0.12).

  • An image index MAY have multiple manifests, but all the manifests SHOULD refer to the same set of layers (because apt-get itself supports multi-arch repo).
  • A layer MUST have org.opencontainers.image.title annotation that corresponds to the file name.
  • A layer SHOULD have one of the following media types:
  • application/octet-stream
  • application/x-binary
Owner
Akihiro Suda
A maintainer of Moby(dockerd), BuildKit, containerd, and runc.
Akihiro Suda
Similar Resources

Docker for Your ML/DL Models Based on OCI Artifacts

Docker for Your ML/DL Models Based on OCI Artifacts

English | 中文 ORMB is an open-source model registry to manage machine learning model. ORMB helps you manage your Machine Learning/Deep Learning models

Dec 30, 2022

Web gateway for OCI artifacts

Web gateway for OCI artifacts

Containerbay Web gateway for OCI artifacts Container images gateway browser and indexer Website static server - Reverse Container image browser Contai

Jan 10, 2022

oci-ccm custom build for both arm64 and amd64

OCI Cloud Controller Manager (CCM) oci-cloud-controller-manager is a Kubernetes Cloud Controller Manager implementation (or out-of-tree cloud-provider

Jan 18, 2022

My over-engineered homepage project to get an idea of the Kubernetes

My over-engineered homepage project to get an idea of the Kubernetes. It shows traffic data from all my GitHub repositories. I added RabbitMQ, Redis and MongoDB so I got to play around with multiple k8s resources

Jan 15, 2022

A helm v3 plugin to get values from a previous release

helm-val helm-val is a helm plugin to fetch values from a previous release. Getting started Installation To install the plugin: $ helm plugin install

Dec 11, 2022

easy way to distribute commands over ssh.

grapes grapes is lightweight tool designed to distribute commands over ssh with ease. Update (25/04/2019) Handshake validation is now in place in orde

Dec 20, 2022

HTTP load testing tool and library. It's over 9000!

HTTP load testing tool and library. It's over 9000!

Vegeta Vegeta is a versatile HTTP load testing tool built out of a need to drill HTTP services with a constant request rate. It can be used both as a

Dec 30, 2022

Run VS Code on any server over SSH.

Run VS Code on any server over SSH.

sshcode This project has been deprecated in favour of the code-server install script See the discussion in #185 sshcode is a CLI to automatically inst

Dec 25, 2022

Access your Kubernetes Deployment over the Internet

Access your Kubernetes Deployment over the Internet

Kubexpose: Access your Kubernetes Deployment over the Internet Kubexpose makes it easy to access a Kubernetes Deployment over a public URL. It's a Kub

Dec 5, 2022
Comments
  • Attempt to get the repo URI from the file URI

    Attempt to get the repo URI from the file URI

    While testing this transport I found that Target-Repo-URI was missing. from the apt messages causing fetches to fail.


    I'm not sure if this is right but it fixed the problem I was having (testing on Ubuntu Focal).

  • Adding packages to an existing repo

    Adding packages to an existing repo

    Hello,

    Thanks a lot for your work on this. We are wanting to use this for package hosting but it looks like you have to push the entire repository each time you want to add a package. Am I missing something? The oras tool doesn't seem to offer a way to add layers to an image either.

    Any insight you could offer would be appreciated, thanks.

    Russ

An Oracle Cloud (OCI) Pulumi resource package, providing multi-language access to OCI

Oracle Cloud Infrastructure Resource Provider The Oracle Cloud Infrastructure (OCI) Resource Provider lets you manage OCI resources. Installing This p

Dec 2, 2022
ghcr images - Fetched from docker-library

ghcri ghcri is the repo for Github Container Registry Images. Just like docker-library for Docker Registry. Usage Replace all docker library from dock

Aug 15, 2022
🤖 Prune old images on GitHub (ghcr.io) and GitLab (registry.gitlab.com) container registry
🤖 Prune old images on GitHub (ghcr.io) and GitLab (registry.gitlab.com) container registry

✨ Prune container images in a CLI way ✨ Prune old images on GitHub (ghcr.io) and GitLab (registry.gitlab.com) Container Registry Getting Started | Des

Dec 15, 2022
Dockpin - A tool for pinning Docker image and apt package versions

Dockpin Install dockpin with: go install github.com/Jille/dockpin@latest Dockpin

Dec 20, 2022
Kubectl Locality Plugin - A plugin to get the locality of pods

Kubectl Locality Plugin - A plugin to get the locality of pods

Nov 18, 2021
Vilicus is an open source tool that orchestrates security scans of container images(docker/oci) and centralizes all results into a database for further analysis and metrics.
Vilicus is an open source tool that orchestrates security scans of container images(docker/oci) and centralizes all results into a database for further analysis and metrics.

Vilicus Table of Contents Overview How does it work? Architecture Development Run deployment manually Usage Example of analysis Overview Vilicus is an

Dec 6, 2022
OCI Image Encryption Package

imgcrypt image encryption library and command line tool Project imgcrypt is a non-core subproject of containerd. The imgcrypt library provides API exe

Jan 5, 2023
Simple, rootless, "FROM scratch" OCI image builder

zeroimage zeroimage some-program is like building the following Docker image: FROM scratch COPY some-program /some-program ENTRYPOINT ["/some-program"

Jun 26, 2022
OCI drive, available from home

OCI Drive ... use your storage with Oracle Object Store Quick Start Make sure you have the Object Storage, bucket and you know the compartment id wher

Nov 10, 2021
Executes an OCI image using firecracker.

oci-image-executor Executes an OCI image using Firecracker. Logs from the executed process (both stdout and stderr) are sent to stdout. Logs from the

Dec 28, 2022