Standards in Containers
- OCI Refer Here
- containerd Refer Here
Docker Architecture
- Earlier docker architecture had only two components
- docker client
- docker daemon

- Then docker has made the changes in architecture with layered components
- docker client: docker client/command line to interact with daemon
- docker daemon: This is service which forwards the request to containerd
- containerd: manages the container lifecycle
- runc: This creates container using libcontainer
- shim: once the contianer is created runc makes shim the parent of container, this helps docker containers to be in running state even if the docker components are upgrading.

Docker installation – Easy way on linux machines
- Create a linux vm (ubuntu 22.04)
- use the docker installation script Refer Here
curl -fsSL https://get.docker.com -o install-docker.sh
sh install-docker.sh
- After the installation execute the command to get version and you will see the failure to get the server version
docker version

* To solve this temporarily elevate the privileges
sudo docker version

* The reason is the user doesnot have permission to access unix socket socket at unix:///var/run/docker.sock. The permission to this exists for all the members of docker group, so lets add the current user to docker group
sudo usermod -aG docker <user-name>
exit
# relogin

docker container lifecycle
- overview

- Lets experiment this with
nginximage Refer Here - Create a container with name
mynginxand image namenginx
docker container create --name mynginx nginx

* Lets start the container which requires container id or name

* Now lets pause and unpause the container

* Now, stop and remove the container

* Now run the container

General stuff
- Container management command

- Image management command

