this post was submitted on 22 Oct 2023
1 points (100.0% liked)
Portainer
34 readers
1 users here now
Portainer Community Edition is a lightweight service delivery platform for containerized applications that can be used to manage Docker, Swarm, Kubernetes and ACI environments.
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Docker doesn't allow you to mount a subpath of a named volume - you can only mount the named volume itself:
When mounting an existing volume in a stack file, you will also need to flag that volume as external otherwise it will try to create it for you. This is done in a separate
volumessection outside of theservicessection:You can share volumes between containers, however I would generally advise a volume for each. This makes the container configurations more independent of each other, whereas shared volumes are less so.
It depends. If you only intend to deploy your stack on the one environment and you don't need the ability to redeploy the stack on another environment, then bind mounts (mounting to a path on the host) are fine. When portability is a concern, named volumes are generally better.
No such thing :)