It’s not just running code that benefits from a reproducible environment — building code in containers is commonplace as well; we wrote about using Docker to cross compile for Raspberry Pi.
If you are not using Linux, you’ll need to figure out how to install Docker. There are several ways to do it under Windows (depending on what version of Windows you use) and I don’t use the Mac.