DevOps Classroomnotes 23/Aug/2023

Standards in Containers

Docker Architecture

  • Earlier docker architecture had only two components
    • docker client
    • docker daemon
      Preview
  • 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.
      Preview

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

Preview
* To solve this temporarily elevate the privileges

sudo docker version

Preview
* 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

Preview

docker container lifecycle

  • overview
    Preview
  • Lets experiment this with nginx image Refer Here
  • Create a container with name mynginx and image name nginx
docker container create --name mynginx nginx

Preview
* Lets start the container which requires container id or name
Preview
* Now lets pause and unpause the container
Preview
* Now, stop and remove the container
Preview
* Now run the container
Preview

General stuff

  • Container management command
    Preview
  • Image management command
    Preview

Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Animated Social Media Icons by Acurax Wordpress Development Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube