You can create volumes to persist data outside the container and to share
into a new container.
docker run -it -v $(pwd)/src:/src node:latest /bin/bashLet's see where our volume data is
cd /src
ls
npm install
node index.js
[Ctrl + c]
exitNow did we affect the host?
ls -la ./srcNote: We now have a node_modules folder