DOCKER




  1. Docker Engine
  1. Docker CLI - Command line interface
  1. Docker registry
Docker Engine is an open-source containerization technology that allows developers to package applications into container
Containers are standardized executable components combining application source code with the operating system (OS) libraries and dependencies required to run that code in any environment.

2. Docker CLI

The command line interface lets you talk to the docker engine and lets you start/stop/list containers
docker run -d -p 27017:27017 mongo
\4

3. Docker registry

The docker registry is how Docker makes money.
It is similar to github, but it lets you push images rather than sourcecode

Images vs containers
Docker Image
A Docker image is a lightweight, standalone, executable package that includes everything needed to run a piece of software, including the code, a runtime, libraries, environment variables, and config files.
Docker Container
A container is a running instance of an image. It encapsulates the application or service and its dependencies, running in an isolated environment.




Port mapping


docker run -d -p 27018:27017 mongo


Common docker commands


docker image: show images
docker ps: show running container
docker run:
Lets you start a container
-p ⇒ let’s you create a port mapping
-d. ⇒ Let’s you run it in detatched mode
docker build: build images Dockerfile
docker push
docker kill
docker exec
                                                              

                      Dockerfile


What is Docker file?
If you want to image your code, then you push in docker hub. 



Comments

Popular posts from this blog

Spread and Rest

Shallow Copy and Deep Copy in JavaScript