docker-compose에서 nfs 마운트하기

msjeong·2021년 1월 4일
0
version: '2.3'

services:
  main:
    container_name: "example"
    build:
      context: ./
      dockerfile: Dockerfile
    runtime: nvidia
    restart: always   
    volumes:     
      - type: volume
        source: nfs_example
        target: /nfs_target
        volume:
          nocopy: true            
    stdin_open: true
    tty: true

volumes:
  nfs_example:
    driver_opts:
      type: "nfs"
      o: "addr={NAS address},nolock,soft,rw"
      device: ":/volume2/nfs_shared"

0개의 댓글