DOCKER
- Docker Engine
- Docker CLI - Command line interface
- Docker registry
Docker Engine is an open-source
containerization technology that allows developers to package applications into containerContainers 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 containersdocker run -d -p 27017:27017 mongo3. Docker registry
The
docker registry is how Docker makes money. It is similar to
github, but it lets you push images rather than sourcecodeImages vs containers
Docker ImageA 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 ContainerA container is a running instance of an image. It encapsulates the application or service and its dependencies, running in an isolated environment.
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
What is Docker file?
If you want to image your code, then you push in docker hub.
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
Post a Comment