17. The Cargo for your container
Obviously you
declare all this
in the manifest !
18. Close it , i.e build it - and you have an image.
19. My Analogy
● Open Container = Docker build directory
● Container Manifest = Docker build File
● The Cargo = The necessary things to run your App
● Properly Closed Container = Properly Built Image
20. Concept of layers in an Image
Each Box of cargo you add forms a LAYER in an image.
You can add a new LAYER on TOP of the previous layer.
Hint :- stack of pancakes
34. Life of a container
While running container, it may create new resources like log
files , database files etc.
35. Life of a container
While running container, it may create new resources like log
files , database files etc.
Once we destroy a container, we LOSE everything.
36. Life of a container - how to preserve its state ?
So, one can choose to MOUNT directories into the container .
37. Life of a container - how to preserve its state ?
So, one can choose to MOUNT directories into the container.
The container can write to the mounted dir and when the
container is destroyed, its state is preserved in the mount.
We call them docker volumes
38. Docker Container - Networking ?
Can i access all the ports of the container ?
39. Docker Container - Networking ?
Can i access all the ports of the container ?
-> By Default No, you need to explicity expose them.
40. Docker Container - Networking ?
Can i access all the ports of the container ?
-> By Default No, you need to explicitly expose PORTS.
Does it have an ip address ?
-> it does a have private IP.