Amazingly enough Karton was released today and might satisfy your requirements. It uses containers to provide runtime Linux environments on Linux and macOS. You can specify what Linux distribution to use, what packages to install, what directories to share, and then run Linux commands pretty much transparently.