DEV Community

technonotes-hacker
technonotes-hacker

Posted on

Docker - Part - I

Virtual Machine

Image description

Image description
Physical servers , Virtual Machine & Containers.

Manual and Dynamic allocation can be done in Virtual Machine.
Type 1 : Its like Enterprise --> In Azure , OCI , etc this concept is used.
Type 2: Mostly which we are using eg., laptop.

  • Containers is a concept.
  • Docker uses containerisation concept.
  • Docker Engine is like Kitchen .
  • Docker File is like notes for recipe.
  • Sambar recipe for all i.e Docker Image . One cup for each person i.e Docker Container.
  • Pantry --> Docker Registry --> all images are available.
  • Chef --> Docker Daemon --> It will be running continuously.
  • Docker Network and Volumes --> Its Dinning Area.
docker        --> To check whether docker is installed or not.
docker images --> List all the images which are present.
docker pull hello-world ( if no version is provided then it will take the latest version only )
Enter fullscreen mode Exit fullscreen mode

Image description

Image description

docker pull hello-world:nanoserver-1809
Enter fullscreen mode Exit fullscreen mode

Now run the image so that a container will be created ,

docker run hello-world
Enter fullscreen mode Exit fullscreen mode

Check the container list,

docker ps -a
( only ps will show the running container )

Enter fullscreen mode Exit fullscreen mode

To delete the container,

docker rm -f <container-id>
Enter fullscreen mode Exit fullscreen mode

Sites or URL

https://hub.docker.com/r/tensorflow/tensorflow/tags

Notes

  1. Image ID will be same for all.
  2. Container ID will be created each time which will be a new number.
  3. While running any image without version , then it will take the latest one only.
  4. If latest image is not there in the server then it will pull and then run the image. So use latest wisely.

Interview Questions

  1. What is VM ? A software emulation of a physical computer.
  2. What does hypervisor do in a virtualisation ? It allows VM to run on a physical host by managing their resources.
  3. What is Docker primarily used for ? Containerising applications to ensure portability.
  4. Advantage of using containers ? Containers are portable & can run across different environments.
  5. which type of hypervisor runs directly on Physical hardware ? Type - 1.
  6. Difference btw VM & Container ? Containers share the host OS , while VM have their won OS.

Need to know

VMware ESXi
vCenter - Server Management Software - vCenter
VMware Workstation

Top comments (0)