Container tooling installs using the Nix package manager.
Nix is a powerful package manager for Linux and other Unix systems that makes package management reliable and reproducible. It provides atomic upgrades and rollbacks, side-by-side installation of multiple versions of a package, multi-user package management and easy setup of build environments.
Nix is a good choice for installing container tools because:
- It has a large selection of packages available.
- While not a trivial to setup, it makes it much easier to add new packages to install when they are not available through standard apt sources.
- It provides a convenient and visible way of managing tooling updates.
The recommended way
to create images with Nix is to use a docker load approach. However, this requires
Nix be installed outside a container. This is not always possible or desirable.
The approach here copies the Nix store into the container instead. The main disadvantage
of this approach is less effective caching of layers. It's likely possible to mitigate
this, but we're starting simple.
Docker and jq to build/test the container images.
Install manually or install Devbox and type devbox shell
to install the dependencies.
See build.sh for example of how to build and run the container images.
There are currently three different types of images:
alpine.Dockerfileusing the standard Nix base container imagescratch.Dockerfileusing a "no distro" scratch image and Busyboxubuntu.Dockerfileusing an Ubuntu-based base imagenix-ubuntu.Dockerfile
The packages to install are defined in flake.nix.