Posts

Showing posts with the label Docker

Docker Interview Questions

Image
  Subscribe YouTube Channel @devops-pathshal a   1. What is Docker ? Ans:- Docker is a platform that allows you to package an application and all its dependencies into lightweight portable containers. 2. What are Containers ? Ans:- Containers are lightweight, isolated environment that package an application along with all dependencies so it run consistently on any system. 3. What is the difference between a container and a Virtual Machine ? Ans:- Containers are lightweight because they share the host operating system, while virtual machine are heavy because they run their own full operating system. Containers start very quickly, use fewer resources and are ideal for microservices. Virtual machines provide stronger isolation but require more RAM and CPU since each VM containers a full OS. So overall, containers are fast and efficient, whereas VMs are heavier but more isolated. 4. What are docker engine ? Ans:- Docker Engine is the core component of  Docker that runs and ma...

Docker Part 2- Image Management

Image
                                                                    Docker Image Management  A docker image is a read only blue print used to create containers. It contains the application code, dependencies and environment required to run the containers.                                              Image vs Container  Feature Docker Image Docker Container Definition Read-only template used to create containers  Running instance of a Docker image State Static (does not change) Dynamic (changes during runtime) Purpose Used to build containers Used to run applications Mutability Immutable (cannot be modified) Mutable (can be modified) Storage Stored on disk Runs in memory + disk Creation Creat...

Basic Commands of Docker

Image
  1. docker –version --> to check docker version   2. docker version --> to check client and host version    3. docker container run httpd --> create container foreground   4. docker container run –d httpd --> create container byground  5. docker container ls --> to show only running container    6. docker container la –a --> to show all container   7. docker ps --> to show container   8. docker container stop container name --> to stop container  9. docker container start container name --> to statr container    10. docker container rm container name --> to delete stop container    11. docker container rm –f container name --> to delete running container   12. docker container run –d –it ubuntu --> to create OS image  13. docker image ls --> to show images   14. docker container run –d –name team httpd --> naming the...