docker-compose.yml

version: '3'
services:
  web:
    build: .
    command: bin/rails s -b '0.0.0.0'
    volumes:
      - .:/app:cached
      - bundle:/usr/local/bundle:cached
      - node_modules:/app/node_modules:cached
      ...

docker volume ls

$ docker volume ls
DRIVER    VOLUME NAME
local     2f9f0061f4b7ff9d895f52f3aa7ff13aa0970ad3fcac5b99c8038d2f8334cb15
local     5b29621626caff54c6b4e51b9f7ced4af5f3ccb2e0c91556e5be8977ce3b22dc
local     53eb068085bdf2f768e66f8b8d9204adaeb9af88d399181a40ee07ea2d034c87
local     839fe47e9ed8de08f3158597bb42fd142c7c0e93b1054e4c2a16c8cd8e59aa3b
local     bafc4fbeb3eb20555e3e8b45c3eb0eefbcf0f627d0c7a548dfb12982e55b9429
local     railstwitterclone_bundle
local     railstwitterclone_node_modules

docker volume inspect

$ docker volume inspect railstwitterclone_bundle
[
    {
        "CreatedAt": "2021-03-18T01:01:55Z",
        "Driver": "local",
        "Labels": {
            "com.docker.compose.project": "railstwitterclone",
            "com.docker.compose.version": "1.28.5",
            "com.docker.compose.volume": "bundle"
        },
        "Mountpoint": "/var/lib/docker/volumes/railstwitterclone_bundle/_data",
        "Name": "railstwitterclone_bundle",
        "Options": null,
        "Scope": "local"
    }
]

docker volume inspect | Docker Documentation

volume の Mountpoint を覗く

ワークアラウンドにはなるが下記のようにして覗ける。

$ docker run -it --privileged --pid=host debian nsenter -t 1 -m -u -n -i sh

Docker Unable to Access to Volume with Screen for Mac | by Rocky Chen | Medium