Bridging snap and apt-get archetectures in docker swarm. #9275
Replies: 3 comments
-
This issue has been marked as stale as it has not had recent activity, it will be closed if no further activity occurs in the next 7 days. If you believe that it has been incorrectly labelled as stale, leave a comment and the label will be removed. |
Beta Was this translation helpful? Give feedback.
-
This is still very fresh! |
Beta Was this translation helpful? Give feedback.
-
When you're deploying a service across a swarm (which is what the Portainer Agent is) you'll have the same configuration for each node in the swarm, as this is the intended design of Docker Swarm itself. One way you could potentially get around this is to have a compose file with two different Agent services - one for apt-installed Docker installations, and one for snap-installed Docker installations. You'd then define an alias of Here's an example, adjust to suit. First, set labels on each node based on the installation method. In this example I'm creating a label called On the manager node, run the following for nodes installed via apt (replace
and for snap-installed nodes, run (replacing
Once that's done, create your Portainer deployment with the following YAML file, adjusting the paths for the
In theory, this should deploy two different agent services with two slightly different configurations, but aliased to the same service name ( However, I would be cautious about running the snap version of Docker. The official Docker documentation advises using the apt method of installation, and we'd recommend the same. We've seen issues in the past from users with Docker installed via snap, many of which are fixed by simply moving to using the apt install method instead. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Is your feature request related to a problem? Please describe.
I'm always frustrated when I try and deploy services on a swarm between two virtual machines, that have been installed in different ways; one with apt-get, the other with snap. They always try and load the snap installed version of dockers sock file from the wrong place (as if it's assuming that the file is located where the apt-get command installs the configuration files.
Describe the solution you'd like
The ability to define the sock file for each individual node of the swarm separately.
Describe alternatives you've considered
Complete uninstallation of all snap instances of docker and reinstallation through apt-get (obviously would prefer not to)
Additional context
Add any other context or screenshots about the feature request here.
Beta Was this translation helpful? Give feedback.
All reactions