In this video, I have explained how to manage data within a Docker container.
Docker volumes are the preferred way to persist data in docker container and services. This helps us to manage data within our docker containers. It separates out the container’s lifecycle from the data.
Two ways to manage your data within docker is:
1) Docker volumes
2) Docker volume containers
Few commands from today's video:
docker run -it -v /data --name container1 ubuntu //Mounting a data volume
docker ps -a //should see our container
docker inspect container1 // it shows info about docker container
docker restart container1 //restart the container
docker attach container1 //open container in interactive mode
docker run -it --name container1 -v /Users:/datavolume ubuntu //Mounting a host directory as a data volume
docker run -it --volumes-from container1 --name container2 ubuntu //create docker volume container
======================
Important playlists
======================
Data Structures • Introduction to Data Structures
Linux: • How to use VIM/VI editor for beginner...
SonarQube: • Install and configure SonarQube serve...
Docker: • Tutorial #1 | Introduction to Docker ...
======================
You can follow me on:
======================
Instagram: / engineerhooon
LinkedIn: / sunny-shaw
Github: https://github.com/sunny-shaw
Medium: / sunnyshaw_12357
=============================================================
|| Subscribe and hit the bell button to get latest content ||
=============================================================
#docker #dockervolume #whatisdockervolume #mountinghostdirectory
Watch video Tutorial #6 | What is Docker volume and How to mount a host directory volume? | Engineer online without registration, duration hours minute second in high quality. This video was added by user Engineerhoon 01 June 2019, don't forget to share it with your friends and acquaintances, it has been viewed on our site 3,717 once and liked it 48 people.