Tutorial #6 | What is Docker volume and How to mount a host directory volume? | Engineer

Опубликовано: 01 Июнь 2019
на канале: Engineerhoon
3,717
48

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


Смотрите видео Tutorial #6 | What is Docker volume and How to mount a host directory volume? | Engineer онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Engineerhoon 01 Июнь 2019, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 3,717 раз и оно понравилось 48 людям.