{"id":15171850,"url":"https://github.com/reproducible-containers/buildkit-nix","last_synced_at":"2025-10-26T00:30:55.058Z","repository":{"id":38352263,"uuid":"434595633","full_name":"reproducible-containers/buildkit-nix","owner":"reproducible-containers","description":"Nix derivations as Dockerfiles (`docker build -f default.nix .`)","archived":false,"fork":false,"pushed_at":"2023-09-13T10:51:18.000Z","size":182,"stargazers_count":171,"open_issues_count":8,"forks_count":17,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-01-31T12:51:22.895Z","etag":null,"topics":["buildkit","dockerfile","nix"],"latest_commit_sha":null,"homepage":"https://github.com/moby/buildkit/issues/1650","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reproducible-containers.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-03T12:53:28.000Z","updated_at":"2024-12-02T05:10:32.000Z","dependencies_parsed_at":"2024-06-20T11:20:47.741Z","dependency_job_id":null,"html_url":"https://github.com/reproducible-containers/buildkit-nix","commit_stats":null,"previous_names":["akihirosuda/buildkit-nix"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reproducible-containers%2Fbuildkit-nix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reproducible-containers%2Fbuildkit-nix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reproducible-containers%2Fbuildkit-nix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reproducible-containers%2Fbuildkit-nix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reproducible-containers","download_url":"https://codeload.github.com/reproducible-containers/buildkit-nix/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238229940,"owners_count":19437723,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["buildkit","dockerfile","nix"],"created_at":"2024-09-27T09:20:37.161Z","updated_at":"2025-10-26T00:30:54.621Z","avatar_url":"https://github.com/reproducible-containers.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# BuildKit-Nix: Nix as Dockerfiles (`docker build -f default.nix .`)\n\nBuildKit-Nix allows using Nix derivations (`default.nix`, `flake.nix`) as Dockerfiles.\n\n## Examples\n\nLegacy (with Niv):\n- [`./examples/nginx/default.nix`](./examples/nginx/default.nix): Nginx\n\nFlakes:\n- [`./examples/nginx-flake/flake.nix`](./examples/nginx-flake/flake.nix): Nginx\n- [`./examples/golang-httpserver-flake/flake.nix`](./examples/golang-httpserver-flake/flake.nix): A simple http server in Go\n- [`./examples/rust-httpserver-flake/flake.nix`](./examples/rust-httpserver-flake/flake.nix): A simple http server in Rust\n\n## Usage\n### With Docker\n\nRequires Docker 20.10 or later.\n\n```\ncd examples/nginx\nexport DOCKER_BUILDKIT=1\ndocker build -t nginx-nix -f default.nix .\ndocker run -d -p 8080:80 --name nginx-nix nginx-nix\n```\n\nThe digest of _the contents of the image_ is reproducible:\n```\ndocker exec nginx-nix cat /.buildkit-nix/result.gunzipped.digest\n```\n\nNote: While the digest of _the contents of the image_ is reproducible (as long as Nix can reproduce it),\nthe digest of _the image itself_ might not be always reproducible, due to potential non-determinism of gzip (and possibly other misc stuffs inside BuildKit).\n\n### With nerdctl\n\n```\ncd examples/nginx\nnerdctl build -t nginx-nix -f default.nix .\n```\n\n### With buildctl\n\n```\ncd examples/nginx\nbuildctl build --frontend dockerfile.v0 --local dockerfile=. --local context=. --opt filename=default.nix\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freproducible-containers%2Fbuildkit-nix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freproducible-containers%2Fbuildkit-nix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freproducible-containers%2Fbuildkit-nix/lists"}