I have a beefy Docker image that I'd like to run on my work machine (OSX 10.13.3, 16 GB RAM, Core i5), but I find that when running the image, along with a web browser, that the computer crashes or needs to rest for long periods of time due to memory errors. Most of these seem to stem from the set of cached files stored in memory, which seem to increase over time:
Is there a way to put a hard limit on the size of the file cache (say, 2GB)?