Containers built with Nix and DNS resolution

Hi all, I’ve built a Docker Image using Nix, with the following contents:

{ pkgs ? import <nixpkgs> { }
}:

pkgs.dockerTools.buildLayeredImage {
  name = "test";
  tag  = "latest";
  created = "now";
  contents = [
    pkgs.dockerTools.binSh
    pkgs.curl
    pkgs.jq
    pkgs.snore
    pkgs.coreutils
    pkgs.fakeNss
  ];
}

And for some reason, when I am using this container in a docker-compose setup, the DNS resolution does not work. I’ve tried having a look at the /etc/resolv.conf file, and it seems to be identical to the rest of the containers (in which the DNS resolution does work).

Which makes me wonder - maybe I am missing some package or configuration here to tell Nix to resolve DNS with /etc/resolv.conf file? Maybe that component is missing?