Reputation: 2057
I am looking at a production architecture and stuck at some questions around designing the solution using Docker?
Upvotes: 0
Views: 366
Reputation: 158908
You can’t do either.
Particularly in a clustered environment (like Kubernetes) a Docker image registry is all but required. A typical model is that a new node will start up with no images, but as it need to run various things, it will pull them on its own. (The registry is the shared cache, if you’d like; it does not specifically need to be Docker Hub.). The cluster manager will generally manage this for you.
The Docker daemon is treated as system software, and you don’t generally try to run multiple copies of it any more than you run multiple cron or ssh daemons. In my experience the daemon itself has been fairly reliable; if there are problems it’s generally because the image/container storage has gotten corrupted.
The general model for production container systems I’m familiar with assumes all of the infrastructure is disposable. If a container crashes, delete and recreate it; if the Docker daemon on a cloud-hosted node dies, delete and recreate it; and so on. If you’re running multiple nodes and multiple replicas of critical pieces like the registry, this gets you a fairly solid HA configuration. The one important requirement is that no data be stored anywhere you’re likely to spontaneously delete and recreate: definitely nothing in the container filesystem, and possibly nothing stored directly on the host filesystem either.
Upvotes: 1