I Declare Defeat - Mount NFS in Docker
1 min read

I Declare Defeat - Mount NFS in Docker

I Declare Defeat - Mount NFS in Docker

Today I've tried to mount a NFS into a docker volume via the following means:

  1. Mount the NFS on the host and create a docker volume using the absolute path
  2. Create a docker volume via NFS

Both variants have failed miserably, in hte sense that I could get the docker container to "see" it, but read-only.

I've used the following sources:

For the time being, I'll fall back to a different strategy:

  1. Mount the NFS share
  2. Create a local folder
  3. Unpack an archive form the NFS share to the local folder
  4. Create a docker volume pointing to the local folder
  5. Start the docker module
  6. Create a job to archive the content of the local folder into a tarball and copy it to the NFS share

This way, I'll have a backup on the NAS, in case I need to redeploy the docker image somewhere else.

HTH,