What is the difference between Docker Service and Docker Container?

前端 未结 5 2057
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-23 19:04

When do we use a docker service create command and when do we use a docker run command?

5条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-23 19:27

    Docker services are like "blueprints" for containers. You can e.g. define a simple worker as a service, and then scale that service to 20 containers to go through a queue really quickly. Afterwards you scale that service down to 3 containers again. Also, via Swarm these containers could be deployed to different nodes of your swarm.

    But yeah, I also recommend reading the documentation, just like @Tristan suggested.

提交回复
热议问题