-
First you'll want to manually create the Docker volumes:
docker volume create --driver local \ --opt type=nfs \ --opt o=addr=nfs_server_ip,rw,nolock,hard,nointr,nfsvers=4 \ --opt device=:/path/to/nfs/share/on/server \ nfs_share docker volume create --driver local \ --opt type=cifs \ --opt o=username=samba_user,password=samba_password,vers=3.0,uid=1000,gid=1000,rw \ --opt device=//samba_server_ip/path/to/samba/share \ samba_share -
Then, deploy the stack.
version: '3.8' services: my_service: image: your_image_name:your_image_tag deploy: replicas: 1 restart_policy: condition: on-failure volumes: - nfs_share:/path/in/container/for/nfs - samba_share:/path/in/container/for/samba volumes: nfs_share: external: true samba_share: external: true
Last active
April 28, 2023 11:56
-
-
Save brian-tex/a54c4933f13401088c474116d560686c to your computer and use it in GitHub Desktop.
This is for Swarm
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment