Docker lifecycle Common docker commands A container is running and you want to see the logs docker logs <contaner-id or name> docker logs <contaner-id or name> -f Docker logs shows only stdout and stderr I want to delete all containers in my system docker rm -f $(docker ps -a -q) I want to delete all… Continue reading DevOps Classroom notes 27/May/2026
Author: continuous learner
devops & cloud enthusiastic learner
DevOps Classroom notes 26/May/2026
USER In linux machines, root user has full permissions, By default when you build image the user is going to root. Example FROM alpine:3 CMD ["sleep", "1d"] docker exec command can run a command in a running container docker exec test whoami docker exec -it test1 /bin/sh It is recommended to run you application as… Continue reading DevOps Classroom notes 26/May/2026
DevOps Classroom notes 24/May/2026
Creating reusable modules Terraform module is a reusable template At the module level Variables we define in the module will become arguments outputs we define in the module will be come attributes of the module Modules will not have a provider block who ever is calling module needs to have a provider block lets create… Continue reading DevOps Classroom notes 24/May/2026
DevOps Classroom notes 21/May/2026
Dockerfile instructions CMD and ENTRYPOINT These instructions will be executed when we are staring the container using the image If neither of them are specified, then base images CMD or ENTRYPOINT wll be used. In the following case, then docker will be excute NGINX CMD or Entrypoint FROM nginx RUN touch 1.txt Your container will… Continue reading DevOps Classroom notes 21/May/2026
DevOps Classroom notes 20/May/2026
Shell form vs Exec FORM When we use Shell form , internally it runs with /bin/sh -c <command> RUN apt update => /bin/sh -c apt update RUN python test.py => /bin/sh -c "python test.py" When we use exec form it directly starts your executable CMD ["python", "test.py"] -> python test.py If we want dynamic values… Continue reading DevOps Classroom notes 20/May/2026
DevOps Classroom notes 19/May/2026
RUN Run instruction will run the command in the container which is used to build image. RUN instruction will execute any linux command Refer Here for official docs In Docker file when we pass RAW commands to instructions we have two forms shell form: you pass raw command bash apt update exec form: you convert… Continue reading DevOps Classroom notes 19/May/2026
DevOps Classroom notes 14/May/2026
Dockerfile Dockerfile has instructions in the form of INSTRUCTION <value> Lets look at the instruction reference In Docker hub we have 3 types of images official images are released by docker Verified publishers or sponsored oss Docker image naming convention for official images <application-name>:<version> tomcat:9 mysql:8.10 Docker image naming convention for Verified publishers or sponsored… Continue reading DevOps Classroom notes 14/May/2026
DevOps Classroom notes 13/May/2026
Containerizing the application Refer Here for the code written in python to create a REST API (Fast API) To run this application, we need python uv dependencies to be installed Code to be copied Application runs on port 18000 the command to start the application uvicorn main:app –host 0.0.0.0 –port 18000 or uv run main.py… Continue reading DevOps Classroom notes 13/May/2026
DevOps Classroom notes 12/May/2026
Creating Docker Images Creating docker images can be done Interactively By specifying instructions in a file Interactively – Lets create a docker image for a website To create a website we need to have web server web design Lets create a docker container with nginx image docker run -d –name web1 -p 80:80 nginx Now… Continue reading DevOps Classroom notes 12/May/2026
DevOps Classroom notes 10/May/2026
Docker Architecture – 5000 feet overview Docker when installed, will have two major components client: a cli tool to interact with server Daemon: this does the heavy lifting To create a process we need an executable (application), Generally from one executable i can create multiple instances of applications, eg: multiple word documents, multiple chorme windows… Continue reading DevOps Classroom notes 10/May/2026
