From 6acf9d24f8f32feac82773a3549f1d1d869d787a Mon Sep 17 00:00:00 2001 From: Earlopain <14981592+Earlopain@users.noreply.github.com> Date: Thu, 25 Jan 2024 10:55:44 +0100 Subject: [PATCH] Add a note about caching and docker to the readme --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 4a5892731c..d851908af0 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,17 @@ require: Now you can run `rubocop` and it will automatically load the RuboCop Rails cops together with the standard cops. +#### Usage with Docker + +When you use Docker make sure that the RuboCop [cache path](https://docs.rubocop.org/rubocop/usage/caching.html#cache-path) is mounted as a volume in order to reliably persist the cache. + +If developing a Rails application there already exists a temporary directory you should be persisting anyways: `tmp` in the application root folder. You can point the RuboCop cache there: + +```yml +AllCops: + CacheRootDirectory: tmp/cache +``` + ### Command line ```sh