What is Docker?
Docker is a set of platform as a service products that use OS-level virtualization to deliver software in packages called containers. It basically bundles all your project as well as its dependencies so anyone can use it in any device. This basically solves any version incompatibility problems which is more prevalent than one thinks.
How Docker works?
Docker uses containers under the hood. A container is a sandboxed process running on a host machine that is isolated from all other processes running on that host machine.
Docker uses a client-server architecture. The Docker client talks to the Docker daemon, which does the heavy lifting of building, running, and distributing your Docker containers. The Docker client and daemon can run on the same system, or you can connect a Docker client to a remote Docker daemon.
To summarize, a container:
- Is a runnable instance of an image. You can create, start, stop, move, or delete a container using the Docker API or CLI.
- Can be run on local machines, virtual machines, or deployed to the cloud.
- Is portable (and can be run on any OS).
- Is isolated from other containers and runs its own software, binaries, configurations, etc.
Most used docker commands:
1. docker run - Creates an image
2. docker ps - Lists all active images
3. docker images - Lists all local images
4. docker rm - Deletes container
5. docker build - Constructs new docker image (needs a dockerfile: https://docs.docker.com/engine/reference/builder/)
In conclusion, docker has become essential for modern day development be it a personal project or group project. It makes life way easier in my opinion, especially for large scale projects.
Comments
Post a Comment