DevOps Classroom notes 03/Jan/2024

Docker installation Details

  • Docker when installed on a linux machine creates a group called as docker group.
  • docker client communicates with docker server (docker daemon) on the unix socket which is accessible only to the users of docker group.
  • So after installation add your user to docker group
sudo usermod -aG docker <user-name>
# exit
# relogin

Preview
* Now get the docker information docker info to see both client and server details
Preview

Running our first container

  • To run the docker container we need docker image (which has all the necessary stuff packaged to run the application)
  • Steps
    1. docker contianer run is issued from client
    2. docker daemon checks in the local image store
    3. if not present downloads from registry (docker hub)
    4. runs the container
      Preview
  • To view the images in docker local store docker image ls

Getting used to docker commands

  • Two ways
    • help. use --help
    • cheatsheet
      Preview

Figure out docker commands

  • create a docker network docker network create
  • list docker volumes docker volume ls
  • stop the docker container
  • remove the docker image
  • build the docker image
  • start all the containers using docker compose
  • stop all the containers docker compose

What is present in docker image and how containers are created

  • To understand this we need to understand
    • cgroups: These put restrictions (256 MB of RAM 1 vcpu)
    • namespaces: This creates virtual isolated
      • process trees
      • mounts
      • users
      • network interfaces

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
Plugin for Social Media by Acurax Wordpress Design Studio

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