Skip to content
This repository has been archived by the owner on Mar 21, 2019. It is now read-only.

Image Registry - How to make our archives addressable and fetchable (Docker Registry vs Nixpkgs vs IPFS vs Dat) #17

Open
mokuki082 opened this issue Mar 18, 2018 · 5 comments
Assignees
Labels
research Something that neeeds to be researched

Comments

@mokuki082
Copy link
Contributor

Usability, portability.
Running registries vs flat files: command linenix-env -f URL.

@mokuki082 mokuki082 self-assigned this Mar 18, 2018
@CMCDragonkai
Copy link
Member

The new docker registry code (delivered by Docker the company) is here: https://github.com/docker/distribution

@CMCDragonkai
Copy link
Member

CMCDragonkai commented Jun 10, 2018

The consideration of the Matrix AI CIIDD system. Where it's tasked to "build" Automaton artifacts. We need to consider whether we write our own "builder" or we wrap existing builders. A builder is something that takes in imperative instructions and executes those instructions and outputs a "serialised" archive format. It is serialised, because it needs to be portable. (These build artifacts must be transported over the network to target hosts). The CIIDD system must also then transparently cache the building process (so that it can be done with minimal work) when you need to rebuild or whatever. Also content addressable. In terms of wrapping existing builders, this depends the archive format we support. Consider if we support Dockerfiles. This means our CIIDD system must be able to read/parse/interpret the Dockerfile and produce a runc/OCI container artifact. Should we do this by building our own "builder", or should we wrap buildkit? (If we wrap buildkit, this means we bind into it, call it, shell out to it... and expect a runc container archive (that is portable)).

@CMCDragonkai
Copy link
Member

Investigations into integration of IPFS and Image/Archive Registries

@CMCDragonkai CMCDragonkai changed the title Docker Registry vs Nixpkgs Image Registry - How to make our archives addressable and fetchable (Docker Registry vs Nixpkgs vs IPFS) Jun 10, 2018
@CMCDragonkai CMCDragonkai changed the title Image Registry - How to make our archives addressable and fetchable (Docker Registry vs Nixpkgs vs IPFS) Image Registry - How to make our archives addressable and fetchable (Docker Registry vs Nixpkgs vs IPFS vs Dat) Jun 10, 2018
@mokuki082 mokuki082 added the research Something that neeeds to be researched label Aug 14, 2018
@CMCDragonkai
Copy link
Member

For integration into the Nix system:

This will likely be useful for making the Artifact specification capable of taking Nix derivations/expressions.

With regards to Dockerfile:

From Nix's perspective, Dockerfiles are just another Makefile. And currently Nix deals with this by using make inside the nix builder. You're aware of how Nix builds things right? The nix-build contacts the nix-daemon which initiates a build running inside a "containerised" process using one of the nixbld* users. So if the Artifact specification can both point to finished artifacts and build expressions, one can just use Nix to support both. The former is just a fixed output derivation, while the latter would be a Nix derivation.

@CMCDragonkai
Copy link
Member

CMCDragonkai commented Sep 18, 2018

I have found some other people who is currently working with Docker and Nix integration. In fact their blog post sounds really interesting and I think their library may be useful for us to understand how to integrate container image layers into a Nix store.

we wanted to maintain the registry’s decomposition of docker images by layer, translating that decomposition (the registry’s image manifest) into something Nix understands

I don't think they are dealing with OCI image yet. But docker v2 should be OCI compatible. Don't be afraid to investigate the source! @mokuki082 @n-zhang-hp

I'm thinking what we'd do is integrate that to help pull in Docker/OCI artifacts from other Docker/OCI registries, then when we push into a nix-store. At this point either our nix-store implementation is already distributed/decentralised/based on IPFS, or that we maintain a distributed binary cache for all the Nodes instead.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
research Something that neeeds to be researched
Development

No branches or pull requests

2 participants