In the day and age there are many new technology was born. This is make the set up and deploy one or many server has difficult. Because one environment has one way to set up and deploy. So if you has ten server you need ten way to set up. It is very waste time and effort. It's for that reason Docker was born to handle and resolve that problem.
So what is Docker ?
Docker is a communication provide for user the building. deploying, running applications as easily as possible. Docker will work through using containers on the virtualization layer. Docker pack applications enter to standardization is called container. It has every thing the application need to run, in there has a library, system tools, code and time run. By the way using Docker, you quickly deployment and change scale the application in any environment and it sure about the application can be run. Because of applicability then now a day Docker has be come a popular communication.
At first Docker written in Python but now a days Docker is written in GoLang.
How is Docker work?
Docker work by provide method to build and run code. As said sometimes Docker has been mistake with virtual machine. But Docker is a operating system dedicated for container, the containers will virtual operating system of the device. Docker has been setting in any device will provide simple commands to set up, build, run and stop the containers.
Build container Docker
We can build Docker with command
docker build -t <name> . (Dot in end of the command is very necessary)
After the build is done, we will has the container and in there has our application and all the library necessary to run the application.
Run container docker
docker run -p <port>:8080 <name>:<version>
Docker Container
Some ingredient of Docker
- Docker Image: This has known to the template to create a container, it contain code of the application, as all tools, library. The image often based on some image available and has some customs. You can build one image by yourself or can be used image in Docker Hub to use. If you really want to build a image, you will get instructions from Dockerfile.
- Docker Client: This is a tool help user communicate with Docker host. Docker host is a ingredient which passed command line can help you connect, communicate with Docker host. Normally, Docker client will perform by passed REST API send to Docker Daemon.
- Docker Daemon: This is a place to listen every request come from Docker Client with target manage object passed REST API like image, container, network or volumes.
- Dockerfile: This is a file that include has contain all instruction, instruct can be build a image. A container docker usually begin with a file text with simple form, in side that has contain instruct about build image container docker file. Besides that, Dockerfile has automation process create image docker. Dockerfile has known is a list command used by Docker Engine to run and rally image.
- Docker Volumes: This is a data has been create in process the containers is create.
- Docker machine: This is a system create docker engine in server.
- Docker Compose: Perform run application passed all define system Docker Container, and run multi-container for Docker application.