Docker 101: Volumes + Network

Docker 101: Volumes + Network

PART VII

ยท

2 min read

DOCKER VOLUME

  • Docker volumes are a way to persist data generated by and used by Docker containers(persistent data storage mechanism).

  • When a container is removed, any data that is not stored in a volume is also deleted.

  • Volumes provide a mechanism to store and share data:

    • between containers

    • and between container and host.

  • Ensuring data durability and persistence, event if container is stopped or removed

  • Volume is Sharable storage compartment that exists outside the container.

DOCKER NETWORK

  • Communication channel that enables different Docker containers to talk to each each other or with the external world (internet)

  • creates connectivity allowing containers to share information and services while maintaining isolation.

  • Real life comparison

    • think of a Docker Network as a big restaurant Kitchen in a large kitchen being the host you have different cooking stations or containers each focused on a specific meal,

    • meal being our application each cooking station or a container is like a chef working independently on a meal

    • Now imagine a system of order tickets or a Docker Network connecting all of these cooking stations together chefs can communicate ask for ingredients or share recipes seamlessly even though each station or container has its own space and focus the communication system or the docker Network enables them to collaborate efficiently they share information without interfering with each other's cooking process

REFERENCE

Repeated volume:

ย