All Projects → AkihiroSuda → buildkit-nix

AkihiroSuda / buildkit-nix

Licence: Apache-2.0 license
Nix derivations as Dockerfiles (`docker build -f default.nix .`)

Programming Languages

go
31211 projects - #10 most used programming language
shell
77523 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to buildkit-nix

nvfetcher
Generate nix sources expr for the latest version of packages
Stars: ✭ 95 (-4.04%)
Mutual labels:  nix
nixpkgs-review-checks
Add additional checks and more information from build logs and outputs to the reports generated by nixpkgs-review.
Stars: ✭ 27 (-72.73%)
Mutual labels:  nix
gockerfile
🐳 gockerfile is a YAML Docker-compatible alternative to the Dockerfile Specializing in simple go server.
Stars: ✭ 44 (-55.56%)
Mutual labels:  buildkit
dns.nix
A Nix DSL for DNS zone files
Stars: ✭ 69 (-30.3%)
Mutual labels:  nix
dockerfile-plus
New commands for Dockerfile
Stars: ✭ 177 (+78.79%)
Mutual labels:  buildkit
nix-config
A collection of my system configs and dotfiles
Stars: ✭ 35 (-64.65%)
Mutual labels:  nix
nixos-installer
Combining the power of Nix, Guile & Elm to install NixOS
Stars: ✭ 14 (-85.86%)
Mutual labels:  nix
impermanence
Modules to help you handle persistent state on systems with ephemeral root storage [maintainer=@talyz]
Stars: ✭ 401 (+305.05%)
Mutual labels:  nix
nix-xdg
[WIP] Nix overlay for making programs xdg compliant
Stars: ✭ 18 (-81.82%)
Mutual labels:  nix
nix bsd mac inventory
Collect Inventory data from *Nix, BSD and mac OS and upload to Device42
Stars: ✭ 17 (-82.83%)
Mutual labels:  nix
psc-package2nix
Tool to derive a Nix expression from a psc-package.json configuration.
Stars: ✭ 13 (-86.87%)
Mutual labels:  nix
nix-configs
My Nix{OS} configuration files
Stars: ✭ 54 (-45.45%)
Mutual labels:  nix
yarn-plugin-nixify
Yarn v3 plugin to help with Nix packaging
Stars: ✭ 41 (-58.59%)
Mutual labels:  nix
nyoom.emacs
Configurable, Minimal, Fast emacs config based on Nano-emacs and Doom
Stars: ✭ 59 (-40.4%)
Mutual labels:  nix
nixos-configuration
A repo for my nixos configuration files
Stars: ✭ 20 (-79.8%)
Mutual labels:  nix
eris
Serve your /nix/store directory over the internet ✨
Stars: ✭ 73 (-26.26%)
Mutual labels:  nix
freebsd-ports-nix
Nix package manager port for the FreeBSD Ports Collection
Stars: ✭ 33 (-66.67%)
Mutual labels:  nix
crane
A Nix library for building cargo projects. Never build twice thanks to incremental artifact caching.
Stars: ✭ 348 (+251.52%)
Mutual labels:  nix
release-services
Mozilla Release Engineering Services
Stars: ✭ 49 (-50.51%)
Mutual labels:  nix
persway
Small Sway IPC Daemon
Stars: ✭ 51 (-48.48%)
Mutual labels:  nix

BuildKit-Nix: Nix as Dockerfiles (docker build -f default.nix .)

BuildKit-Nix allows using Nix derivations (default.nix, flake.nix) as Dockerfiles.

Examples

Legacy (with Niv):

Flakes:

Usage

With Docker

Requires Docker 20.10 or later.

cd examples/nginx
export DOCKER_BUILDKIT=1
docker build -t nginx-nix -f default.nix .
docker run -d -p 8080:80 --name nginx-nix nginx-nix

The digest of the contents of the image is reproducible:

docker exec nginx-nix cat /.buildkit-nix/result.gunzipped.digest

Note: While the digest of the contents of the image is reproducible (as long as Nix can reproduce it), the digest of the image itself might not be always reproducible, due to potential non-determinism of gzip (and possibly other misc stuffs inside BuildKit).

With nerdctl

cd examples/nginx
nerdctl build -t nginx-nix -f default.nix .

With buildctl

cd examples/nginx
buildctl build --frontend dockerfile.v0 --local dockerfile=. --local context=. --opt filename=default.nix
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].