For a certain definition of "correctly" (namely: it doesn't, it just does what containers do and ships unique versions for every package).
If you like writing bash scripts then go for it. (Personally I'd rather be doing literally anything else, like, I don't know, shoveling manure.)
Only if they isolate each atomic package individually. Which is exactly what Nix is and what Docker isn't.