Docker

Mount Network File System (NFS) as a volume

  1. Check the NFS export list for a particular IP with showmount -e <IP>

  2. In docker-compose.yml:

services:
  some-service:
    volumes:
      - type: volume
        source: some-nfs-volume
        target: /destination/in/container
        volume:
          nocopy: true

volumes:
  some-nfs-volume:
    driver: local
    driver_opts:
      type: nfs
      o: "addr=<IP>,nolock,soft,rw,"
      device: ":/exported/NFS/path/"

Last updated