Docker Executor - Setting disable_cache disables all volumes
## Summary According to the [runner advanced configuration docs](https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-runnersdocker-section) regarding the `disable_cache` it states this should only disable the local cache directory. However when configuring this it also disables all of the additional `volumes` defined. Looking over the code in [manager.go](https://gitlab.com/gitlab-org/gitlab-runner/-/blob/main/executors/docker/internal/volumes/manager.go#L137) it appears there is no special consideration for additional volumes defined in `volumes = []` such as `/certs/client` used for certificates. The limits the use of disabling cache with only non encrypted connections. ## Steps to reproduce - Setup a runner with additional an additional volume `/certs/client` and set `disable_cache` to true. - run a job using the runner and see the job logs. ![image001](/uploads/453a748ecbbadf1745b7b06c0665b4b5/image001.png) </details> ## Actual behavior All volumes are disabled instead of only the cache directory ## Expected behavior Only the cache volume should be disabled. ## Relevant logs and/or screenshots ![image001](/uploads/453a748ecbbadf1745b7b06c0665b4b5/image001.png) ## Environment description <details> <summary>config.toml contents</summary> ```toml [[runners]] name = "Example docker-dind" url = https://gitlab.com (https://gitlab.com/) id = &lt;redacted&gt; token = &lt;redacted&gt; token_obtained_at = 2023-09-13T15:00:08Z token_expires_at = 0001-01-01T00:00:00Z executor = "docker" [runners.custom_build_dir] [runners.cache] MaxUploadedArchiveSize = 0 [runners.cache.s3] [runners.cache.gcs] [runners.cache.azure] [runners.docker] tls_verify = false image = "docker:latest" privileged = true disable_entrypoint_overwrite = false oom_kill_disable = false disable_cache = true volumes = ["/certs/client", "/cache"] shm_size = 0 ``` </details> ### Used GitLab Runner version Present in latest code Tested on 16.10.0 ## Possible fixes
issue