-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
Description
Describe the bug
When building a docker image using dockerTools.buildLayeredImage one can't use enableFakechroot because the package proot is not built for aarch64-darwin. This prevents building the docker image on darwin.
Steps To Reproduce
Flake to reproduce the behavior:
{
inputs = { nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; };
outputs = { self, nixpkgs }:
let pkgs = nixpkgs.legacyPackages.aarch64-darwin;
in {
packages.aarch64-darwin.default = pkgs.dockerTools.buildLayeredImage {
name = "enableFacechroot doesn't work on darwin'";
enableFakechroot = true;
};
};
}Expected behavior
Not sure about this. I think a better error message would be nice. As in "Cannot use enableFakechroot with aarch64-darwin" or sth similar.
Additional context
Stumbled upon this when building a java microservice for work and packaging it into a Docker image.
Documentation of the option in the nixpkgs reference documentation: https://nixos.org/manual/nixpkgs/stable/#:~:text=enableFakechroot%20(Boolean;%20optional)
Notify maintainers
@NixOS/darwin-maintainers and bc I saw you on the git blame: @the-sun-will-rise-tomorrow @Mic92 @mplanchard
(Did I miss the official maintainers of dockerTools? I couldn't find them)
Metadata
Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.
- system: `"aarch64-darwin"`
- host os: `Darwin 23.4.0, macOS 14.4`
- multi-user?: `yes`
- sandbox: `no`
- version: `nix-env (Nix) 2.18.1`
- channels(root): `"nixpkgs"`
- nixpkgs: `/Users/<me>/.nix-defexpr/channels/nixpkgs`Add a 👍 reaction to issues you find important.