Skip to content

Instantly share code, notes, and snippets.

@lvnilesh
Created October 21, 2024 17:20
Show Gist options
  • Save lvnilesh/7bbe3a86384102477d0128710d12d63c to your computer and use it in GitHub Desktop.
Save lvnilesh/7bbe3a86384102477d0128710d12d63c to your computer and use it in GitHub Desktop.
mount an NFS export directly inside a docker container
services:
web:
image: nginx:latest
ports:
- "80:80"
volumes:
- web_data:/usr/share/nginx/html
# volumes:
# web_data:
volumes:
web_data:
driver_opts:
type: "nfs"
o: "addr=NAS.cg.home.arpa,nolock,rw,soft,nointr,nfsvers=4"
device: ":/mnt/tank/nfs/somerandomfolder"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment