The smallest example is:
pkgs.dockerTools.buildLayeredImage { name = "hello"; contents = [ pkgs.hello ]; }
The smallest example is: