Relationship between snaps and containers, if any

Mark Shuttleworth mark at ubuntu.com
Wed Jan 25 13:51:29 UTC 2017


The best way to think of this is to know that snaps are GREAT when you
have a precise 1:1 relationship between "machines" and "running
instances". And Docker is GREAT when you want an elastic relationship.
So for example, if you want a MySQL "appliance" on a device, there will
only ever be 1 MySQL instance on that device, you want a snap. If you
want a cluster where there may be 1-many instances of MySQl on each
actual machine or VM, then you want Docker.

The reason for this is that Docker gives each running process its own IP
address. That's perfect for the hyper-elastic case - each extra MySQSL
is just another IP address to talk to. But if you have a machine where
you already have an IP address and all you want is a MySQL there then a
snap will be easier.

This is why a snap of the Docker daemon makes such sense - in your
cluster, you want exactly one copy of Docker itself running on each
machine, and that is best pulled in as  a snap. That docker process then
manages an arbitrary number of docker processes on each machine.

Make sense?
Mark







More information about the Snapcraft mailing list