Consulting: Is snap the right tool for my requirements?

I have a server application consisting of 2 docker images. I need the most simple and straightforward way for installing them for my customers and upgrading (e.g. replacing) when newer version available.

I was thinking of making a dedicated “manager” Snap package, which is responsible to install Docker if missing and then run my images. Than manager shall be run as a daemon and replace running containers with newer versions, when available.

I wondering if that is the right way to do what I looking for. From permissions aspect, does Snap package has permissions to access Docker and run images?

Can you suggest something better?

I’m not sure, but for reference there is a docker interface: https://docs.snapcraft.io/the-docker-support-interface/7810

1 Like

thats interesting.

To be able to use it, does docker snap required? i asking since that snap is discontinued, as far as i know

Refer: The Future of the Docker Snap

I’m not sure snaps are a prefect fit, given the way your application is currently packaged. Snapd basically does what you’re suggesting for your “manager” snap (versioning, updating, monitoring, etc), but it does it for snaps. If you could package your apps as a snap instead of a docker image, it would be much more straight forward.

One of the issues you’ll run into is that if your manager was to install docker, it would need to run with classic confinement. This would probably mean you would need your own “brand” store to host your snap.

1 Like

A very simple version of what you want is Docker Compose. It doesn’t do 100% though. Kubernetes (K8s) is more of what you want.

I haven’t tried it myself but there’s a snap of MicroK8s, which is a mini installation of K8s, that’s available. https://microk8s.io/

1 Like