Container Yard is a declarative, reproducible, and reusable decentralized approach for defining containers. Think Nix flakes meets Containerfiles (aka

Search code, repositories, users, issues, pull requests...

submited by
Style Pass
2024-07-27 04:00:04

Container Yard is a declarative, reproducible, and reusable decentralized approach for defining containers. Think Nix flakes meets Containerfiles (aka Dockerfiles).

Container Yard breaks Containerfiles into modules. Modules represent some specific functionality of a container. e.g. The rust module defines rust's installation. Modules also support Tera templating.

To compose the modules defined in yard.yaml into Containerfiles, simply run yard build .. Which in the above case, will output a single Containerfile to your current directory.

A module consists of a Tera template named Containerfile and a yard-module.yaml file that defines configuration options and dependencies of the template.

Developers constantly rewrite the same Containerfile/Dockerfile configs. Besides taking away developer time, these configs become hard to maintain/upgrade and adding new features feels like starting from scratch again. The goal of ContainerYard is to foster a library ecosystem of composable Containerfile modules. Users can then import these various modules with little to no configuration. Want Rust? Just add it to your yard.yaml file. Want Flutter? Do the same. With ContainerYard you should never have to define certain Containerfile configs again. But if you do want to do something custom, ContainerYard does not get in your way, everything is Containerfile based and the output is a pure Containerfile. No need to learn a complex tool, no need to re-invent the wheel, Containerfiles and Tera templates are powerful enough. Just let ContainerYard be the glue.

Nix flakes guarantees reproducibility at the cost of developer flexibility. Container Yard is decentralized, allowing users to easily use different package managers and upstreams. As such, Container Yard sacrifices some reproducibility guarantees and gains complete developer flexibility.

Leave a Comment