Skip to main content

Command Palette

Search for a command to run...

Docker for Beginner

Published
•2 min read•View as Markdown
Docker for Beginner

Docker is an open platform for developing, shipping and running applications. It enables us to separate applications from infrastructure. It reduces the time between writing code and running it in production.

Docker can

  • Containerize an application

  • Isolate applications from each other

  • Run each service with its dependencies in separate containers

A container is a unit of software that packages code and all its dependencies so the application runs quickly in different environments.

A Docker container image is a lightweight standalone executable package of software that includes everything needed to run and application code, runtime, libraries and settings

An image is a package or template which is used to create one or more containers

Image vs Container

  • Image is the application we want to run

  • A Container is an instance of that image running as a process

    The one big difference between containers and VMs is that containers share the host system’s kernel with other containers.

Docker Engine is the runtime and tooling that managed containers, images, build and more. It is made up of

  1. Docker Daemon

  2. Docker Client - communicates with Docker Daemon to execute commands

  3. A Rest API for interacting with Docker Daemon

DockerFile is a file where we write the instructions to build a docker image. Each instruction in the dockerfile adds a mew layer to the image/