Skip to content

Latest commit

 

History

History
37 lines (30 loc) · 756 Bytes

storage-volumes.md

File metadata and controls

37 lines (30 loc) · 756 Bytes

Storage Volumes

Storage volumes verwalten

docker volume ls
docker volume create test-vol
docker volume ls
docker volume inspect test-vol

Storage volumes in container einhängen

# Schritt 1
docker run -it --name container-test-vol --mount target=/test_data,source=test-vol ubuntu bash
1234ad# touch /test_data/README 
exit
# stops container 
docker container ls -a
# Schritt 2:
# create new container and check for /test_data/README 
docker run -it --name=container-test-vol2 --mount target=/test_data,source=test-vol ubuntu bash
ab45# ls -la /test_data/README 

Storage volume löschen

# Zunächst container löschen 
docker rm container-test-vol 
docker rm container-test-vol2
docker volume rm test-vol