{"id":19197,"date":"2017-11-22T12:15:24","date_gmt":"2017-11-22T10:15:24","guid":{"rendered":"https:\/\/www.webcodegeeks.com\/?p=19197"},"modified":"2017-11-22T10:32:05","modified_gmt":"2017-11-22T08:32:05","slug":"docker-swarm-nfs-volumes","status":"publish","type":"post","link":"https:\/\/www.webcodegeeks.com\/devops\/docker-swarm-nfs-volumes\/","title":{"rendered":"Docker (Swarm) and NFS volumes"},"content":{"rendered":"<p>Investigating how to use shared volumes with Docker (Swarm), I decided to take a look at NFS volumes, since this is probably the most used on premises way to share folders.<\/p>\n<p>With Docker, you have 3 different syntaxes to mount NFS volumes :<\/p>\n<ul>\n<li>simple container (via docker volume create + docker run)<\/li>\n<li>single service (via docker service create)<\/li>\n<li>complete stack (docker deploy -f stack.yml)<\/li>\n<\/ul>\n<p>I actually had some trouble mounting NFS volumes, especially with images that COPY files into declared volumes.<\/p>\n<p>So, without further ado\u2026<\/p>\n<h3>Mounting a NFS share to a Docker container<\/h3>\n<p>Let\u2019s start creating a folder under our nfs share (\/nfs)<\/p>\n<pre class=\"brush:shell\">#(host) mkdir \/nfs\/test\r\n#(host) ls -al\r\ndrwxr-xr-x 2 nfsnobody nfsnobody 4096 Nov 18 18:37 test\r\n#(host) touch \/nfs\/test\/hello-test<\/pre>\n<p>Now we have a file named \u00ab\u00a0hello-test\u00a0\u00bb under \/nfs\/test\/<\/p>\n<p>Let\u2019s create a new docker volume linked to this nfs share, and then let\u2019s spin up a new container that mounts this volume :<\/p>\n<pre class=\"brush:shell\">#(host) docker volume create --driver local --opt type=nfs --opt o=addr=nfs.my.corporate.network,rw --opt device=:\/nfs\/test test\r\n test\r\n#(host) docker run --rm -it -v test:\/data alpine\r\n#(container) touch \/data\/hello-from-container\r\n#(container) ls -al \/data\r\n-rw-r--r-- 1 nobody nobody 0 Nov 19 02:44 hello-from-container\r\n-rw-r--r-- 1 nobody nobody 0 Nov 19 02:43 hello-test\r\n#(host) ls -al \/nfs\/test\/\r\n-rw-r--r-- 1 nfsnobody nfsnobody 0 Nov 18 18:44 hello-from-container\r\n-rw-r--r-- 1 nfsnobody nfsnobody 0 Nov 18 18:43 hello-test<\/pre>\n<p>So far, so good ! (did you notice the host root user mapping to nfsnobody and the container root user mapping to nobody? we\u2019ll come back to this a bit later)<br \/>\nThings unfortunately get weirder when you mount to a defined VOLUME location.<br \/>\nFor example, with this Dockerfile :<\/p>\n<pre class=\"brush:sql\">FROM alpine\r\nVOLUME \/data<\/pre>\n<pre class=\"brush:shell\">#(host) docker build -t volume:defined .\r\n#(host) docker run --rm -it -v test:\/data alpine<\/pre>\n<p>Everything works great.<br \/>\nNow if you try to do the same thing with an image that copied something to this volume :<\/p>\n<pre class=\"brush:sql\">FROM alpine\r\nVOLUME \/data\/\r\nCOPY empty.file \/data\/empty.file<\/pre>\n<pre class=\"brush:shell\">#(host) docker build -t volume:defined-with-copy .<\/pre>\n<p>and try to map \/data to the nfs volume, this time you\u2019ll get :<\/p>\n<pre class=\"brush:shell\">\r\n2\r\n#(host) docker run --rm -it -v test:\/data volume:defined-with-copy\r\ndocker: Error response from daemon: chown \/var\/lib\/docker\/volumes\/test\/_data: operation not permitted.<\/pre>\n<p>To get out of this issue, you need the <a href=\"https:\/\/docs.docker.com\/engine\/reference\/run\/#volume-shared-filesystems\">nocopy<\/a> option :<\/p>\n<pre class=\"brush:shell\">#(host) docker run --rm -it -v test:\/data:nocopy volume:defined-with-copy\r\n#(container) ls -al \/data\r\n-rw-r--r-- 1 nobody nobody 0 Nov 19 02:44 hello-from-container\r\n-rw-r--r-- 1 nobody nobody 0 Nov 19 02:43 hello-test<\/pre>\n<p>Notice how the original empty.file from the Docker file was \u00ab\u00a0nocopy\u00a0\u00bbed<br \/>\nSo we got away with our issue, well, except something that was provided by the image (empty.file), is not anymore\u2026<\/p>\n<p>Let\u2019s clean up first the previous experimentation<\/p>\n<pre class=\"brush:shell\">docker volume rm test\r\ntest<\/pre>\n<p>and move on to services.<\/p>\n<h2>Mounting a NFS share to a Docker service<\/h2>\n<p>This use case is more interesting than the previous one, since you only need to mount once to the service, and the volume will be mounted to any container created by this service, on any host part of the swarm. (here the service will just ls \/data; by the way, don\u2019t try to do anything fancy in <a href=\"https:\/\/github.com\/moby\/moby\/issues\/29171\">entrypoint overriding from a service creation<\/a>\u00a0 \u2013 the parsed command is \u2026 not obvious\u2026)<\/p>\n<pre class=\"brush:shell; wrap-lines:false\"># docker service create --mount 'type=volume,src=test,volume-driver=local,dst=\/data\/,volume-opt=type=nfs,volume-opt=device=:\/nfs\/test,volume-opt=o=addr=nfs.my.corporate.network' --name test --entrypoint=ls volume:defined \/data\/<\/pre>\n<pre class=\"brush:shell\"># docker service logs -f test\r\ntest.1.4wteqs8zsd99@worker01 | hello-from-container\r\ntest.1.4wteqs8zsd99@worker01 | hello-test<\/pre>\n<p>So far so good, but now with the infamous VOLUME with copy :<\/p>\n<pre class=\"brush:shell; wrap-lines:false\">docker service create --mount 'type=volume,src=test,volume-driver=local,dst=\/data\/,volume-opt=type=nfs,volume-opt=device=:\/nfs\/test,volume-opt=o=addr=nfs.my.corporate.network' --name test --entrypoint=ls volume:defined-with-copy \/data\/<\/pre>\n<p>The service won\u2019t create the container ! To see that, use service ps :<\/p>\n<pre class=\"brush:shell\"># docker service ps test --no-trunc\r\nID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS\r\ni3 test.1 volume:defined-with-copy worker01 Ready Rejected 2 seconds ago \"chown \/data\/docker\/volumes\/test\/_data: operation not permitted\"<\/pre>\n<p>So adding a <a href=\"https:\/\/docs.docker.com\/engine\/reference\/commandline\/service_create\/#add-bind-mounts-volumes-or-memory-filesystems\">volume-nocopy=true<\/a> should solve the issue :<\/p>\n<pre class=\"brush:shell; wrap-lines:false\"># docker service create --mount 'type=volume,src=test,volume-driver=local,dst=\/data\/,volume-nocopy=true,volume-opt=type=nfs,volume-opt=device=:\/nfs\/test,volume-opt=o=addr=nfs.my.corporate.network' --name test --entrypoint=ls volume:defined-with-copy \/data\/<\/pre>\n<p>Since, per the <a href=\"https:\/\/docs.docker.com\/engine\/reference\/commandline\/service_create\/#add-bind-mounts-volumes-or-memory-filesystems\">documentation<\/a> :<\/p>\n<p>\u00ab\u00a0By default, if you attach an empty volume to a container, and files or directories already existed at the mount-path in the container (<code>dst<\/code>), the Engine copies those files and directories into the volume, allowing the host to access them. Set <code>volume-nocopy<\/code> to disables copying files from the container\u2019s filesystem to the volume and mount the empty volume. A value is optional: \u00a0\u00bb<\/p>\n<p>and indeed, the service is now started :<\/p>\n<pre class=\"brush:shell\"># docker service logs -f test\r\ntest.1.on5ahp585oqy@worker01 | hello-from-container\r\ntest.1.on5ahp585oqy@worker01 | hello-test<\/pre>\n<p>now, to have this service interact with others, let\u2019s create a stack<\/p>\n<h2>Mounting a NFS share in a Docker Stack<\/h2>\n<p>To create a stack, we\u2019ll create a docker-compose.yml file this time :<\/p>\n<pre class=\"brush:php\">version: '3.4'\r\n \r\nnetworks:\r\n  terracotta-net:\r\n    driver: overlay\r\n \r\nvolumes:\r\n  test:\r\n    driver: local\r\n    driver_opts:\r\n      type: nfs\r\n      o: addr=nfs.my.corporate.network,rw\r\n      device: \":\/nfs\/test\"\r\nservices:\r\n  producer:\r\n    image : volume:defined-with-copy\r\n    command:  |\r\n      \/bin\/sh -c \"\r\n        while true;\r\n          do touch \/data\/hello-from-producer;\r\n          echo '\/data\/hello-from-producer written';\r\n          sleep 5;\r\n          rm \/data\/hello-from-producer;\r\n          echo '\/data\/hello-from-producer deleted';\r\n          sleep 5;\r\n        done\r\n      \"\r\n    volumes:\r\n      - type: volume\r\n        source: test\r\n        target: \/data\r\n        volume:\r\n          nocopy: true\r\n  consumer:\r\n    image : volume:defined-with-copy\r\n    command :  |\r\n      \/bin\/sh -c \"\r\n        while  true; do ls -al \/data\/;  sleep  1;  done\r\n      \"\r\n    volumes:\r\n      - type: volume\r\n        source: test\r\n        target: \/data\r\n        volume:\r\n          nocopy: true<\/pre>\n<p>So a producer will write a file to the nfs share, and a consumer will ls -al the folder where the file is supposed to be written to; let\u2019s deploy it and see how well that goes :<\/p>\n<pre class=\"brush:shell\"># docker stack deploy test --compose-file docker-compose.yml\r\nCreating network test_default\r\nCreating service test_producer\r\nCreating service test_consumer\r\n# docker service logs -f test_producer\r\ntest_producer.1@worker01 | \/data\/hello-from-producer written\r\ntest_producer.1@worker01 | \/data\/hello-from-producer deleted\r\n[...]\r\n# docker service logs -f test_consumer\r\ntest_consumer.1@worker02 | drwxr-xr-x 2 nobody nobody 4096 Nov 20 04:39 .\r\ntest_consumer.1@worker02 | drwxr-xr-x 19 root root 218 Nov 20 04:39 ..\r\ntest_consumer.1@worker02 | total 4\r\ntest_consumer.1@worker02 | drwxr-xr-x 2 nobody nobody 4096 Nov 20 04:40 .\r\ntest_consumer.1@worker02 | drwxr-xr-x 19 root root 218 Nov 20 04:40 ..\r\ntest_consumer.1@worker02 | -rw-r--r-- 1 nobody nobody 0 Nov 20 04:40 hello-from-producer\r\ntest_consumer.1@worker02 | total 4\r\n[...]<\/pre>\n<p>So that worked pretty well : you\u2019ll notice the <a href=\"https:\/\/docs.docker.com\/compose\/compose-file\/#volumes\">nocopy syntax that is this time<\/a> :<\/p>\n<pre class=\"brush:shell\">volumes:\r\n  - type: volume\r\n    source: test\r\n    target: \/data\r\n    volume:\r\n      nocopy: true<\/pre>\n<p>If you make the <strong>mistake<\/strong> of putting it like this :<\/p>\n<pre class=\"brush:shell\">volumes:\r\n  - type: volume\r\n    source: test\r\n    target: \/data:nocopy<\/pre>\n<p>you\u2019ll probably end up with :<\/p>\n<pre class=\"brush:shell; wrap-lines:false\">worker01 Shutdown Failed 19 seconds ago \"starting container failed: error while mounting volume '\/var\/lib\/docker\/volumes\/test_test\/_data': error while mounting volume with options: type='nfs' device=':\/nfs\/test:nocopy' o='addr='nfs.my.corporate.network,rw': no such file or directory\"<\/pre>\n<p>since there is no folder named \/nfs\/test:nocopy !<\/p>\n<h2>Was that so terrible ?<\/h2>\n<p>Well, the different syntaxes are a bit confusing, and the error messages sometimes are\u2026<\/p>\n<p>Oh, I almost forgot, about the users ownerships : if you run an image that creates a new user and uses this owner to start the process that will write the file to the NFS share : well, according to your NFS share setup, it could be that the user created in the container could map to \u2026 a whole different user than nfsnobody !<br \/>\nIn that case make sure all your images create this user the same way on Docker nodes that are configured the same, so that they\u2019ll all interact nicely with the NFS share !<\/p>\n<p>Special thanks to my colleague <a href=\"https:\/\/github.com\/akomakom\/\">Akom<\/a> who helped me debug those error messages along the way !<\/p>\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td>Published on Web Code Geeks with permission by Anthony Dahanne, partner at our <a href=\"http:\/\/www.webcodegeeks.com\/join-us\/wcg\/\" target=\"_blank\" rel=\"noopener\">WCG program<\/a>. See the original article here: <a href=\"http:\/\/blog.dahanne.net\/2017\/11\/20\/docker-swarm-and-nfs-volumes\/\" target=\"_blank\" rel=\"noopener\">Docker (Swarm) and NFS volumes<\/a><\/p>\n<p>Opinions expressed by Web Code Geeks contributors are their own.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Investigating how to use shared volumes with Docker (Swarm), I decided to take a look at NFS volumes, since this is probably the most used on premises way to share folders. With Docker, you have 3 different syntaxes to mount NFS volumes : simple container (via docker volume create + docker run) single service (via &hellip;<\/p>\n","protected":false},"author":1701,"featured_media":10356,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[217],"class_list":["post-19197","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-devops","tag-docker"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Docker (Swarm) and NFS volumes - Web Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"Investigating how to use shared volumes with Docker (Swarm), I decided to take a look at NFS volumes, since this is probably the most used on premises way\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.webcodegeeks.com\/devops\/docker-swarm-nfs-volumes\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Docker (Swarm) and NFS volumes - Web Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"Investigating how to use shared volumes with Docker (Swarm), I decided to take a look at NFS volumes, since this is probably the most used on premises way\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webcodegeeks.com\/devops\/docker-swarm-nfs-volumes\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webcodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2017-11-22T10:15:24+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/01\/docker-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Anthony Dahanne\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@anthonydahanne\" \/>\n<meta name=\"twitter:site\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Anthony Dahanne\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.webcodegeeks.com\/devops\/docker-swarm-nfs-volumes\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/devops\/docker-swarm-nfs-volumes\/\"},\"author\":{\"name\":\"Anthony Dahanne\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/48f9eb34a3a9072d373378459cfe8fd2\"},\"headline\":\"Docker (Swarm) and NFS volumes\",\"datePublished\":\"2017-11-22T10:15:24+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/devops\/docker-swarm-nfs-volumes\/\"},\"wordCount\":742,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/devops\/docker-swarm-nfs-volumes\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/01\/docker-logo.jpg\",\"keywords\":[\"Docker\"],\"articleSection\":[\"DevOps\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.webcodegeeks.com\/devops\/docker-swarm-nfs-volumes\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webcodegeeks.com\/devops\/docker-swarm-nfs-volumes\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/devops\/docker-swarm-nfs-volumes\/\",\"name\":\"Docker (Swarm) and NFS volumes - Web Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/devops\/docker-swarm-nfs-volumes\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/devops\/docker-swarm-nfs-volumes\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/01\/docker-logo.jpg\",\"datePublished\":\"2017-11-22T10:15:24+00:00\",\"description\":\"Investigating how to use shared volumes with Docker (Swarm), I decided to take a look at NFS volumes, since this is probably the most used on premises way\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/devops\/docker-swarm-nfs-volumes\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webcodegeeks.com\/devops\/docker-swarm-nfs-volumes\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/devops\/docker-swarm-nfs-volumes\/#primaryimage\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/01\/docker-logo.jpg\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/01\/docker-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webcodegeeks.com\/devops\/docker-swarm-nfs-volumes\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.webcodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"DevOps\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/devops\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Docker (Swarm) and NFS volumes\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"name\":\"Web Code Geeks\",\"description\":\"Web Developers Resource Center\",\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.webcodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webcodegeeks\",\"https:\/\/x.com\/webcodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/48f9eb34a3a9072d373378459cfe8fd2\",\"name\":\"Anthony Dahanne\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/47b8309e680b8610ffb6b61bcc16ac8bec317372a9af910c619fc2b93c50fe70?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/47b8309e680b8610ffb6b61bcc16ac8bec317372a9af910c619fc2b93c50fe70?s=96&d=mm&r=g\",\"caption\":\"Anthony Dahanne\"},\"description\":\"Anthony Dahanne is a Java software developer for 8 years, his favorite topics are Android, building tools, Continuous Integration and, of course, core Java development. Working for Terracotta, he currently implements the REST management interface for EhCache.\",\"sameAs\":[\"http:\/\/blog.dahanne.net\/\",\"https:\/\/www.linkedin.com\/in\/anthonydahanne\",\"https:\/\/x.com\/anthonydahanne\"],\"url\":\"https:\/\/www.webcodegeeks.com\/author\/anthony-dahanne\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Docker (Swarm) and NFS volumes - Web Code Geeks - 2026","description":"Investigating how to use shared volumes with Docker (Swarm), I decided to take a look at NFS volumes, since this is probably the most used on premises way","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.webcodegeeks.com\/devops\/docker-swarm-nfs-volumes\/","og_locale":"en_US","og_type":"article","og_title":"Docker (Swarm) and NFS volumes - Web Code Geeks - 2026","og_description":"Investigating how to use shared volumes with Docker (Swarm), I decided to take a look at NFS volumes, since this is probably the most used on premises way","og_url":"https:\/\/www.webcodegeeks.com\/devops\/docker-swarm-nfs-volumes\/","og_site_name":"Web Code Geeks","article_publisher":"https:\/\/www.facebook.com\/webcodegeeks","article_published_time":"2017-11-22T10:15:24+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/01\/docker-logo.jpg","type":"image\/jpeg"}],"author":"Anthony Dahanne","twitter_card":"summary_large_image","twitter_creator":"@anthonydahanne","twitter_site":"@webcodegeeks","twitter_misc":{"Written by":"Anthony Dahanne","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webcodegeeks.com\/devops\/docker-swarm-nfs-volumes\/#article","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/devops\/docker-swarm-nfs-volumes\/"},"author":{"name":"Anthony Dahanne","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/48f9eb34a3a9072d373378459cfe8fd2"},"headline":"Docker (Swarm) and NFS volumes","datePublished":"2017-11-22T10:15:24+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/devops\/docker-swarm-nfs-volumes\/"},"wordCount":742,"commentCount":0,"publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/devops\/docker-swarm-nfs-volumes\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/01\/docker-logo.jpg","keywords":["Docker"],"articleSection":["DevOps"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webcodegeeks.com\/devops\/docker-swarm-nfs-volumes\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webcodegeeks.com\/devops\/docker-swarm-nfs-volumes\/","url":"https:\/\/www.webcodegeeks.com\/devops\/docker-swarm-nfs-volumes\/","name":"Docker (Swarm) and NFS volumes - Web Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/devops\/docker-swarm-nfs-volumes\/#primaryimage"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/devops\/docker-swarm-nfs-volumes\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/01\/docker-logo.jpg","datePublished":"2017-11-22T10:15:24+00:00","description":"Investigating how to use shared volumes with Docker (Swarm), I decided to take a look at NFS volumes, since this is probably the most used on premises way","breadcrumb":{"@id":"https:\/\/www.webcodegeeks.com\/devops\/docker-swarm-nfs-volumes\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webcodegeeks.com\/devops\/docker-swarm-nfs-volumes\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/devops\/docker-swarm-nfs-volumes\/#primaryimage","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/01\/docker-logo.jpg","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/01\/docker-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.webcodegeeks.com\/devops\/docker-swarm-nfs-volumes\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webcodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"DevOps","item":"https:\/\/www.webcodegeeks.com\/category\/devops\/"},{"@type":"ListItem","position":3,"name":"Docker (Swarm) and NFS volumes"}]},{"@type":"WebSite","@id":"https:\/\/www.webcodegeeks.com\/#website","url":"https:\/\/www.webcodegeeks.com\/","name":"Web Code Geeks","description":"Web Developers Resource Center","publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webcodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.webcodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.webcodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webcodegeeks","https:\/\/x.com\/webcodegeeks"]},{"@type":"Person","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/48f9eb34a3a9072d373378459cfe8fd2","name":"Anthony Dahanne","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/47b8309e680b8610ffb6b61bcc16ac8bec317372a9af910c619fc2b93c50fe70?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/47b8309e680b8610ffb6b61bcc16ac8bec317372a9af910c619fc2b93c50fe70?s=96&d=mm&r=g","caption":"Anthony Dahanne"},"description":"Anthony Dahanne is a Java software developer for 8 years, his favorite topics are Android, building tools, Continuous Integration and, of course, core Java development. Working for Terracotta, he currently implements the REST management interface for EhCache.","sameAs":["http:\/\/blog.dahanne.net\/","https:\/\/www.linkedin.com\/in\/anthonydahanne","https:\/\/x.com\/anthonydahanne"],"url":"https:\/\/www.webcodegeeks.com\/author\/anthony-dahanne\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/19197","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/users\/1701"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/comments?post=19197"}],"version-history":[{"count":0,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/19197\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media\/10356"}],"wp:attachment":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media?parent=19197"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/categories?post=19197"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/tags?post=19197"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}