Or use NixOS/Guix Systems instead of living in the stone age of containers...
Or, alternatively, realize both are valid options and have different use-cases.
Or big-brain it and use Nix to build your containers and get the best of both worlds.