1.

What is a Docker image? How are they shared and accessed?

Answer»

A developer writes code instructions to define all the applications and its dependencies in a file CALLED a “Dockerfile”.Dockerfile is used to create a ‘Docker image’ using the ‘docker build <directory>’ command.The build command is run by the docker daemon.

When you run a Docker image “Containers” are created. Containers are runtime instances of a Docker image.

  • A Container can have MANY images.
  • Docker containers are stored in a docker registry on docker host.
  • Docker has a client-Server architecture.
  • Docker registry is generally pushed and shared on a Docker hub (REMOTE server).

Image CREDIT: docs.docker.com

  • Other developers ‘Docker pull’ these registry images and create containers in their own environment.
  • Developers can run their applications in the same docker container as their peers.
  • This way you can get the same test environment on different servers with the same applications and dependencies.


Discussion

No Comment Found