DevOps Classroom notes 04/Dec/2025

How Docker Works

  • Docker internally relies on two major concepts of linux
    • namespaces
    • cgroups
  • Refer Here for docker internals

Docker Historical events to know

  • In initial versions of docker, docker daemon (engine) used to directly interact with linux kernel to create containers, with this when some of linux kernels upgraded docker containers used to stop working.
    • Then docker created a component called as libcontainer
  • After becoming successful org, docker has started adding lots of features into container making it fat, rkt containers backed by coreos promised lightweight containers. Then OCI
    • OCI came up with
      • Image Specification
      • Runtime Specification
      • Distributions Specification.
  • Docker re-engineered the whole daemon

First Responsibility as a DevOps Engineer.

  • Containerization: Run your application in a container
  • We need to learn how to build docker images.
  • To build a docker image we have two ways
    • manual
    • Dockerfile

Manual steps -> VM:

  • Lets look at deploying a website into server.
  • consider this website as your organization code/design
  • Refer Here for website
  • Refer Here for website download link
  • we need a server (linux/windows) and a webserver (apache/nginx/iis)
    • lets choose linux and nginx
  • Prompt
You are an expert linux admin, I have an ubuntu 24.04 system, I will give you the intent can you share commands to acheive that
  • Commands
sudo apt update
sudo apt install nginx -y
sudo apt install unzip -y
cd /tmp
wget https://www.tooplate.com/zip-templates/2117_infinite_loop.zip
mkdir website
cd website/
cp ../2117_infinite_loop.zip .
unzip 2117_infinite_loop.zip
cd 2117_infinite_loop/
sudo cp -R . /var/www/html/
  • To create the image for th above we have two choices
    • take a os image like alpine/ubuntu/centos -> install nginx -> do the rest
    • take nginx and just copy your design
  • Exercise:
    • create a nginx container
    • find out where is html directory in nginx image
    • Find a command to copy files from host into container
    • Find a command to create a image from container
Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a ReplyCancel reply

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

Please turn AdBlock off
Social Media Icons Powered by Acurax Web Design Company

Discover more from Direct DevOps from Quality Thought

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

Continue reading

Exit mobile version
%%footer%%