Day 3
Two types of volumes
1) Local - within docker machine, scope is within container.
2) Flocker - is a driver, helps to have volume outside local machine. it can be in cloud/IP/server/host. docker machine should have access to target.
communicating from one container to antoher is -e option via environment variable. if data is more, then volume level.
first level communication is :
- data communication
- volume communicaton
- network communication
In docker, two methods of volume association:
1) -v
2) --mount - came into existence since 17.0
Difference between these two options:
performance wise - same.
error and mgmt perspective - (--mount) is good compared to -v.
Duplex communication:
- container can update data in mnt location. and mnt can update container. i.e RW
- container reads from mount and cannot do modification to mnt i.e R only
- mnt can see where is the container but container cannot see where it's mounted.
In -v option, if path is not access we get an error.
if mount point is not accessible/not available - then it gets created.
In --mount it doesn't create mnt point on its own. It verifies if the given path or mnt point is accessible.
Comments
Post a Comment