By default, processes only get locally persistent storage
Why should containers work differently?
Containers are even worse by default
–
Enter container:
docker run -it ubuntu
Inside container:
touch /file.txt
ls -l /
exit
Look for file in new instance:
docker run -it ubuntu
It’s gone!
–
Enter container with bind mount:
docker run -it -v /source:/source ubuntu
Create file:
touch /file
ls –l /
exit
Look for file in new instance:
docker run -it -v /source:/source ubuntu
It’s alive!
–
Hard problem for green field
NFS shares are a good option
Docker storage plugins connect to storage backends