ehough / docker-nfs-server

A lightweight, robust, flexible, and containerized NFS server.
https://hub.docker.com/r/erichough/nfs-server/
GNU General Public License v3.0
669 stars 221 forks source link

example of docker-compose.yml #60

Open garanews opened 3 years ago

garanews commented 3 years ago

Can some one please provide a sample of docker-compose with couple of services where docker-nfs-server is configured and used?

sergiobrr commented 3 years ago

I'm using this

nfs:
    image: erichough/nfs-server:latest
    volumes:
      - ./app/auto_tagging/models:/mnt/autotagging_models
      - ./exports:/etc/exports
    ports:
      - 2049:2049
      - 2049:2049/udp
      - 32765:32765
      - 32765:32765/udp
      - 32767:32767
      - 32767:32767/udp
    cap_add:
      -  SYS_ADMIN
     privileged: true
garanews commented 3 years ago

Hello @sergiobrr ,thanks for the config. What I was looking for is a docker-compose with couple of services where one is the nfs server and the other is any service that uses it (webserver,whatever). I ended up with confidence that is not possible have in the same docker-compose both nfs server and container that will use the nfs server because during build the first container is not (yet) resolved by internal dns.

killmasta93 commented 1 year ago

@sergiobrr hi there, i was wondering these

      - ./app/auto_tagging/models:/mnt/autotagging_models
      - ./exports:/etc/exports

what variables did you put?