← Home

Container image registry on ipfs

23 January, 2022

DRAFT 0.1

Existing Solutions

IPDR

Related project InterPlanetary Docker Registry, a cli tool to push/pull images on ipfs written in go.

High-level overview e License MIT

$ ipdr push example/helloworld
$ ipdr pull /ipfs/QmagW4H1uE5rkm8A6iVS8WuiyjcWQzqXRHbM3KuUfzrCup

ipdr cli tool acts as a middle man to integrate 2 services:

It includes also support with a local server as a docker registry but does not seem to work only for pull. Documentation compatibility states Docker Registry HTTP API V2, so anyone could use the software on top of registry as cli or along internal implementation of registry pulls for convenience.

This solution serves the purpose of using ipfs as the filestorage of container images for local usage development.

Proposed direction

Architecture

Edit

In the proposed architecture the registry is an ipfs node that provider Docker Registry API so clients can push and pull images.

Usage example based on docker registry:

docker build -t ipfs-registry .
docker run -d -p 5000:5000 --restart=always \
           -v `pwd`/config.yml:/etc/docker/registry/config.yml \
           ipfs-registry
docker pull localhost:5000/python:latest

Implementation details

Go

Looking for open source implementations of Docker HTTP API v2 registry and ipfs nodes, starting from go language projects, we were unable to find registry's code repository (now distribution).IPDR Docker HTTP API implementation reference license to Google in code. On the other hand, official ipfs node implementation, with go, has really good organised packages.

Rust

Interesting in Rust we found the project trow has even envision, under Advanced Distribution Deployment as:

Every (or most) nodes run an instance of the Trow Back End. These instances communicate and share files with each other in a P2P style (similar to BitTorrent). This should provide an enormous speed in up in image deployment time for the cluster. It should also be designed to place minimal extra load on nodes.

Only alpha toolkit for ipfs under ipfs 0.2.1 but promising.

Python

Red hat's container registry quay projects is in Python but really hard to find any ipfs node implementation at the time of search.