# Mount NFS Share to Container

<table data-view="cards"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Time Required</td><td>5 minutes</td></tr><tr><td>Difficulty</td><td>Easy - Moderate</td></tr><tr><td>Required Knowledge</td><td>SSH, Docker Compose</td></tr></tbody></table>

<pre class="language-yaml" data-title="docker-compose.yml"><code class="lang-yaml"><strong>version: "2.3"
</strong>services:
  app:
    image: myimage
    volumes:
      - nfs:/container/path
....

volumes:
  nfs:
    driver_opts:
      type: "nfs"
      o: addr=$NFSSERV,nfsvers=4
      device: $NFSPATH
</code></pre>

{% code title=".env" %}

```
NFSSERV=fully.qualified.domain or IP address of NFS server
$NFSPATH=:/Path/To/NFS/Share
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.trentbauer.com/guides/other-guides/docker-compose/mount-nfs-share-to-container.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
