Docker Essential Training - 5 | Storage and Volumes

Reading time ~1 minute

Main Course Link

This Series is a part of 30 Days of Learning.

This course is a tutorial series for the DCA exam using Docker EE. This Lesson deals with Volumes using Docker.

  • Storage Overview
    • Container data should not be stored in the container as they are emphermal.
    • Container filesystem was not designed for high perfromance IO
    • Volume -> /vat/lib/docker/volumes
    • bind mounts -> host’s file path
    • tempfs -> in RAM
  • Block vs object storage
    • Block has fixed chuncks of data, best for I/O calls.
    • Object storage for container images similar to s3.
    • Docker has layered storage, for an image, below are the layers. (Docker union file system)
      • Manifest
      • OS layer
      • Config Changes
      • Applications
    • We can check this by using _docker history _
  • Storage Drivers.
    • overlay2 - For container’s write, default choice.
    • Device-mapper uses block-based storage and can serve as an alternative to overlaying.
    • When you change the storage driver, all the images will be lost. So better save them with the docker image save command.
    • Volumes are used to store persistent data. Even can save on remote system
    • Use bind mounts as type = bind, source=/tmp
    • Make sure you prune the unused images the dangling images.

My First 10K run

> 10K doneI ran my first 5k in Nov 2015. I was quite elated at the experience that wrote a post in this blogThis year, I had set a goal f...… Continue reading

Walking around in Ranikhet and Majkhali

Published on July 04, 2021

Python GUI Development: Tkinter

Published on June 23, 2021