DevOps Classroomnotes 23/Aug/2023

Standards in Containers

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 nginx image Refer Here
  • Create a container with name mynginx and image name nginx
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
Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a comment

Turn on JavaScript to leave a comment.

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

Please turn AdBlock off
Customized Social Media Icons from Acurax Digital Marketing Agency
Exit mobile version
%%footer%%