Some questions on Docker basics? Some questions on Docker basics? docker docker

Some questions on Docker basics?


Looks like you are confused after reading to many documents. Let me try to put this in simple words. Hope this will help.

When we install a docker,where it gets installed? Is it in our computer in local or does it happen in cloud?

  • We install the docker on VM be it you on-prem VM or cloud. You can install the docker on your laptop as well.

Where does containers get pulled into?I there a way I can see what is inside the container?(I'm using Ubuntu 18.04)

  • This question can be treated as lack of terminology awareness. We don't pull the container. We pull the image and run the container using that.

    Quick terminology summary

    Container-> Containers allow you to easily package an application's code, configurations, and dependencies into a template called an image.

    Dockerfile-> Here you mention your commands or infrastructure blueprint.

    Image -> Image gets derived from Dockerfile. You use image to create and run the container.

    Yes, you can log inside the container. Use below command

    docker exec -it <container-id> /bin/bash

When we pull an image.Docker image or clone a repository from Git.where does this data get is stored?

  • You can pull the opensource image from Docker-hub
  • When you clone the git project which is docerized, you can look for Dockerfile in that project and create the your own image by build it.

    docker build -t <youimagenae:tag> .

  • When you build or pull the image it get store in to your local.

    user docker images command

Refer the below cheat-sheet for more commands to play with docker.enter image description here


  1. The docker daemon gets installed on your local machine and everything you do with the docker cli gets executed on your local machine and containers.
  2. (not sure about the 1st part of your question). You can easily access your docker containers by docker exec -it <container name> /bin/bash for that you will need to have the container running. Check running containers with docker ps
  3. (again I do not entirely understand your question) The images that you pull get stored on your local machine as well. You can see all the images present on your machine with docker images

Let me know if it was helpful and if you need any futher information.