Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Volumes

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/bash

Let's see where our volume data is

cd /src
ls
npm install
node index.js

[Ctrl + c]

exit

Now did we affect the host?

ls -la ./src

Note: We now have a node_modules folder