Docker

The role of Docker is easy to understand. It is a container engine, which means that our container is ultimately created by Docker and runs in Docker. Other container technologies are based on Docker, which is the core of other container technologies we use.

Docker-Compose

Docker-compose is composed for managing your containers. It’s kind of like a container keeper. Imagine if your Docker has hundreds of containers that need to be started. Docker-compose: for docker-compose, you just need to write a file, declare the container you want to start, configure some parameters, execute the file, and Docker will start all the containers according to your declared configuration, just docker-compose up. Docker-compose can only manage the Docker on the current host, that is, cannot start Docker containers on other hosts

Docker Swarm

Docker Swarm is a tool used to manage Docker containers on multiple hosts. It can help you start the container and monitor the status of the container. If the status of the container is abnormal, it will help you restart a new container to provide services, and also provide load balancing between services. Docker-compose can’t do that

Kubernetes

Kubernetes itself has the same role positioning as Docker Swarm, that is to say, they are responsible for the same part of the container field, they are a cross-host container management platform, of course, there are some different characteristics. K8s is a container management platform developed by Google based on its own years of experience in operation and maintenance. Docker Swarm was developed by Docker.

Since these two things are the same, it’s a choice. Which one should you learn? In fact, Kubernetes has become the default container management technology used by many large companies in the past two years, and Docker Swarm has gradually lost its power in the competition with Kubernetes, and now the field of container management has gradually been dominated by Kubernetes. Therefore, it is recommended that when you study, you should consider whether there are many people in the industry using this technology.

It should be noted that Docker Swarm lost the competition with Kubernetes, but this has nothing to do with Docker container engine, it is the cornerstone of the entire container field technology, Kubernetes is nothing without it.

conclusion

Docker Compose is the core and foundation of container technology. Docker Compose is a single-host container orchestration tool based on Docker. K8s is a cross-host cluster deployment tool, not as rich as Docker Swarm and Kubernetes are cross-host container management platforms based on Dcoker