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
Linux Classroom notes 27/may/2026
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
Linux Classroom notes 26/may/2026
Linux Classroom notes 25/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
