2

I have successfully created a Windows Docker Image and I can successfully run the container with docker-compose, for full functionality the application expects a folder location to exist, which is currently a NFS attached drive that contains a folder inside it that the application reads and writes to and is also used by other applications.

I have tried to find valid examples and documentation on Docker for Windows, Windows Containers and Docker Compose for Volumes that are NFS.

This is what I am currently trying

version: "3.4" services: service: build: context: . dockerfile: ./Dockerfile image: imageName ports: - 8085:80 environment: - volumes: - type: volume source: nfs_example target: C:\example volume: nocopy: true volumes: nfs_example: driver: local driver_opts: type: "nfs" o: "addr=\\fileserver.domain,nolock,soft,rw" device: ":\\Shared\\Folder" 

The error message I get is:

ERROR: create service_nfs_example: options are not supported on this platform 

1 Answer 1

4

NFS doesn't work.I solved it using SMB on the host, then mounted that volume.

New-SmbGlobalMapping -RemotePath \\contosofileserver\share1 -Credential Get-Credentials -LocalPath G: 
version: "3.4" services: service: build: context: . dockerfile: ./Dockerfile image: imageName ports: - 8085:80 environment: - volumes: - type: bind source: G:\share1 target: C:\inside\container 

This microsoft documentation on the windows containers helped me achieve this.

Sign up to request clarification or add additional context in comments.

1 Comment

I was going to praise you... But then I got this error: Error response from daemon: hcsshim::CreateComputeSystem 19aeae670260b165dc94ef170bc8d141a1e735d163768cc7d55846693a9fffcf: The request is not supported. I'm desperate to make this work...

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.