-
Notifications
You must be signed in to change notification settings - Fork 462
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to pass docker socket as volume? #37
Comments
Hi @megastef, Our template system does not support bind mounts currently. Only volumes. When you declare a volume in a template definition, Docker will automatically create a volume and map it to the path specified in the template. So in your case, you won't be able to achieve what you want... yet. And, no, templates are container only for now and Swarm services are not supported... yet. |
@deviantony I think I saw demos/videos of Portainer and Swarm the other day. Is access to docker.sock possible now, as @megastef asked above? Or does this depend on #42? |
Once portainer/portainer#587 is implemented, you will be able to define the path to the Docker socket inside the See portainer/portainer#590 for the implementation and an example. |
This is now integrated in Portainer 1.12. |
@deviantony Great, thank you! I will make a PR with the template soon. |
Reopened, we need to find a way to easily bind the Docker socket in the templates. Detailed problem in #52 |
Hi, could I suggest a format for volumes?
The settings specified would be the defaults in the Portainer UI. BTW, you could get some inspiration in the Rancher Catalog for app templates, UI settings etc. Basically there is one file mapping UI entries to variable names, and kind of docker-compose file using the variables, entered by the user. |
Any progress here? |
@megastef see portainer/portainer#777 for the evolution on this |
portainer/portainer#777 has been implemented ! Docs available via http://portainer.readthedocs.io/en/stable/templates.html#volumes |
Hi,
the volume entry in the template is a simple array. How could i pass
-v /var/run/docker.sock:/var/run/docker.sock
?I'm working on a template entry and access to docker socket is mandatory for it, see: https://gist.github.com/megastef/0a97da2cecd619e643edf2a1307c6fb4
Ahh, one more question - is there an option to run a global Swarm service via template?
Thx
Stefan
The text was updated successfully, but these errors were encountered: