Table of contents
Docker Engine
It is an open source containerization technology for building and containerizing your applications.
When you install Docker on a Linux host you're actually installing three different competence.
👉Docker Daemon
- Is the background process that manages objects such as the images containers volumes and networks
👉REST API
- Is the API Interface that programs can use to talk to the daemon and provide instructions
👉Docker CLI
- Command Line Interface to perform action run destroy stop start
Below are the fundamentals of containers:-
Containerization
Namespace-PID
Process ID
Unix Timesharing/User (currently experiencing support for)
Mount
Interprocess Communication IPC
Network
cgroups
Docker container
CPU
Memory
Disk
Priority
docker run --cpus=.5 ubuntu
docker run --memory=100m ubuntu
Docker Storage
It is used to store the data and image layer in the writable layer of container.
Filesystem
/var/lib/docker
aufs
containers
image
volumes
Layered Architecture
Base Ubuntu Layer
Changes in apt packages
Changes in pip packages
Source code
Update Entry point
FROM Ubuntu
RUN apt-get update && apt-get -y install python
RUN pip install flask flask-mysql
COPY . /opt/source-code
ENTRYPOINT FLASK_APP=/opt/source-code/app/py flask
COPY-ON-WRITE
Container Layer
Image Layers
Volumes
Docker host
Read Only
Read write
docker volume create data_volume
Storage drivers
AUFS
ZFS
BTRFS
Device Mapper
Overlay
Overlay2
Docker Networking
Default networks
Bridge
docker run ubuntu
none
docker run Ubuntu --network=none
host
docker run Ubuntu --network=host
User-defined networks
docker network create \
--driver bridge \
--subnet 191.45.2.0/16
custom-isolated-network
docker network ls
Inspect Network
docker inspect create-network-architecture
Embedded DNS
mysql.connect( mysql )
That's great if you have make till here you have covered basic of docker engine, storage and networking.
If you liked what you read, do follow and any feedback for further improvement will be highly appreciated!
Thank you and Happy Learning!👏