C-D-theory

📘 Containerization Class – 12 February

🔹 Topic: Bind Mount, Volume, and Tmpfs in Docker

In this class, we learned how to manage data in Docker using bind mounts, volumes, and tmpfs mounts.


🔗 https://upessocs.github.io/#dir=/Lectures/Containerization%20and%20DevOps/Theory/&file=201%20Data%20Management%20in%20Docker%20with%20volume%20bind-mount%20and%20tempfs%2017-20.md


📝 Task 1: Create Bind Mount

Bind mount is used to link a folder from the host system to the container.

Steps:


📝 Task 2: Use Volume in Container

Docker volumes are used to store container data permanently.

Steps:


📝 Task 3: Inspect Volume

Volume inspection is used to see details of a volume.

Steps:

Output Screenshot

Bind Mount Output


📝 Task 4: Create Tmpfs Mount

Tmpfs mount stores data temporarily in memory.

Steps:

Output Screenshot

Docker Volume Output


✅ Conclusion

In this experiment, we learned:

These techniques help in managing persistent and temporary data in Docker containers.