Some of my docker compose configs use 'named volumes' which map a path to a volume that persists between containers... e.g. for node_modules. Trouble his that these volumes don't get updated once created, just re-used, so, rebuilding a docker image that installs node_modules to an internal path (mapped over by the named volume, I think?) does not update the volume with new node_modules. Instead one has to delete the volume and have it recreated fresh (or do something I have yet to discover).

In any case, when I need to update it I can...

docker compose down -v or docker volume rm my-volume (docker volume ls to see the options) or docker volume prune -af to prune everything

Then rebuild and voila.