Docker tries to mkdir the folder that I mount












4















Why is Docker trying to create the folder that I'm mounting? If I cd to C:UsersszxProjects



docker run --rm -it -v "${PWD}:/src" ubuntu /bin/bash


This command exists the following error:



C:Program FilesDocker Toolboxdocker.exe: Error response from daemon: error while creating mount source path '/c/Users/szx/Projects': mkdir /c/Users/szx/Projects: file exists.


I'm using Docker Toolbox on Windows 10 Home.










share|improve this question























  • Did you resolve this issue? I got the same

    – ferprez
    Nov 28 '18 at 16:30
















4















Why is Docker trying to create the folder that I'm mounting? If I cd to C:UsersszxProjects



docker run --rm -it -v "${PWD}:/src" ubuntu /bin/bash


This command exists the following error:



C:Program FilesDocker Toolboxdocker.exe: Error response from daemon: error while creating mount source path '/c/Users/szx/Projects': mkdir /c/Users/szx/Projects: file exists.


I'm using Docker Toolbox on Windows 10 Home.










share|improve this question























  • Did you resolve this issue? I got the same

    – ferprez
    Nov 28 '18 at 16:30














4












4








4








Why is Docker trying to create the folder that I'm mounting? If I cd to C:UsersszxProjects



docker run --rm -it -v "${PWD}:/src" ubuntu /bin/bash


This command exists the following error:



C:Program FilesDocker Toolboxdocker.exe: Error response from daemon: error while creating mount source path '/c/Users/szx/Projects': mkdir /c/Users/szx/Projects: file exists.


I'm using Docker Toolbox on Windows 10 Home.










share|improve this question














Why is Docker trying to create the folder that I'm mounting? If I cd to C:UsersszxProjects



docker run --rm -it -v "${PWD}:/src" ubuntu /bin/bash


This command exists the following error:



C:Program FilesDocker Toolboxdocker.exe: Error response from daemon: error while creating mount source path '/c/Users/szx/Projects': mkdir /c/Users/szx/Projects: file exists.


I'm using Docker Toolbox on Windows 10 Home.







docker docker-windows






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jun 12 '18 at 13:05









szxszx

2,71232949




2,71232949













  • Did you resolve this issue? I got the same

    – ferprez
    Nov 28 '18 at 16:30



















  • Did you resolve this issue? I got the same

    – ferprez
    Nov 28 '18 at 16:30

















Did you resolve this issue? I got the same

– ferprez
Nov 28 '18 at 16:30





Did you resolve this issue? I got the same

– ferprez
Nov 28 '18 at 16:30












4 Answers
4






active

oldest

votes


















4














I got this error after changing my Windows password. I had to go into Docker settings and do "Reset credentials" under "Shared Drives", then restart Docker.






share|improve this answer































    1














    Make sure the folder is being shared with the docker embedded VM. This differs with the various types of docker for desktop installs. With toolbox, I believe you can find the shared folders in the VirtualBox configuration. You should also note that these directories are case sensitive. One way to debug is to try:



    docker run --rm -it -v "/:/host" ubuntu /bin/bash


    And see what the filesystem looks like under "/host".






    share|improve this answer



















    • 1





      I saw my C drive was being shared, thought it was a mistake and un-shared it via the properties window. Then I ran into this error. Just using the Docker Desktop gui for windows under the 'Shared Drives' settings page I was able to fix this error by re-sharing the drive again.

      – 2b77bee6-5445-4c77-b1eb-4df3e5
      Mar 6 at 13:50











    • Thanks, Sharing the C drive solved my issue too

      – Chandru
      Mar 6 at 15:13



















    0














    Did you use this container before? You could try to remove all the docker-volumes before re-executing your command.



    docker volume rm `(docker volume ls -qf dangling=true)`


    I tried your command locally (MacOS) without any error.






    share|improve this answer
























    • Thanks, but unfortunately this didn't help, the output of docker volume ls -qf dangling=true was empty

      – szx
      Jun 15 '18 at 17:22



















    0














    I faced this error when another running container was already using folder that is being mounted in docker run command. Please check for the same & if not needed then stop the container. Best solution is to use volume by using following command -



    docker volume create



    then Mount this created volume if required to be used by multiple containers..






    share|improve this answer























      Your Answer






      StackExchange.ifUsing("editor", function () {
      StackExchange.using("externalEditor", function () {
      StackExchange.using("snippets", function () {
      StackExchange.snippets.init();
      });
      });
      }, "code-snippets");

      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "1"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f50817985%2fdocker-tries-to-mkdir-the-folder-that-i-mount%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      4 Answers
      4






      active

      oldest

      votes








      4 Answers
      4






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      4














      I got this error after changing my Windows password. I had to go into Docker settings and do "Reset credentials" under "Shared Drives", then restart Docker.






      share|improve this answer




























        4














        I got this error after changing my Windows password. I had to go into Docker settings and do "Reset credentials" under "Shared Drives", then restart Docker.






        share|improve this answer


























          4












          4








          4







          I got this error after changing my Windows password. I had to go into Docker settings and do "Reset credentials" under "Shared Drives", then restart Docker.






          share|improve this answer













          I got this error after changing my Windows password. I had to go into Docker settings and do "Reset credentials" under "Shared Drives", then restart Docker.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Dec 17 '18 at 22:00









          melicentmelicent

          386414




          386414

























              1














              Make sure the folder is being shared with the docker embedded VM. This differs with the various types of docker for desktop installs. With toolbox, I believe you can find the shared folders in the VirtualBox configuration. You should also note that these directories are case sensitive. One way to debug is to try:



              docker run --rm -it -v "/:/host" ubuntu /bin/bash


              And see what the filesystem looks like under "/host".






              share|improve this answer



















              • 1





                I saw my C drive was being shared, thought it was a mistake and un-shared it via the properties window. Then I ran into this error. Just using the Docker Desktop gui for windows under the 'Shared Drives' settings page I was able to fix this error by re-sharing the drive again.

                – 2b77bee6-5445-4c77-b1eb-4df3e5
                Mar 6 at 13:50











              • Thanks, Sharing the C drive solved my issue too

                – Chandru
                Mar 6 at 15:13
















              1














              Make sure the folder is being shared with the docker embedded VM. This differs with the various types of docker for desktop installs. With toolbox, I believe you can find the shared folders in the VirtualBox configuration. You should also note that these directories are case sensitive. One way to debug is to try:



              docker run --rm -it -v "/:/host" ubuntu /bin/bash


              And see what the filesystem looks like under "/host".






              share|improve this answer



















              • 1





                I saw my C drive was being shared, thought it was a mistake and un-shared it via the properties window. Then I ran into this error. Just using the Docker Desktop gui for windows under the 'Shared Drives' settings page I was able to fix this error by re-sharing the drive again.

                – 2b77bee6-5445-4c77-b1eb-4df3e5
                Mar 6 at 13:50











              • Thanks, Sharing the C drive solved my issue too

                – Chandru
                Mar 6 at 15:13














              1












              1








              1







              Make sure the folder is being shared with the docker embedded VM. This differs with the various types of docker for desktop installs. With toolbox, I believe you can find the shared folders in the VirtualBox configuration. You should also note that these directories are case sensitive. One way to debug is to try:



              docker run --rm -it -v "/:/host" ubuntu /bin/bash


              And see what the filesystem looks like under "/host".






              share|improve this answer













              Make sure the folder is being shared with the docker embedded VM. This differs with the various types of docker for desktop installs. With toolbox, I believe you can find the shared folders in the VirtualBox configuration. You should also note that these directories are case sensitive. One way to debug is to try:



              docker run --rm -it -v "/:/host" ubuntu /bin/bash


              And see what the filesystem looks like under "/host".







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Nov 28 '18 at 16:31









              BMitchBMitch

              66.4k10146163




              66.4k10146163








              • 1





                I saw my C drive was being shared, thought it was a mistake and un-shared it via the properties window. Then I ran into this error. Just using the Docker Desktop gui for windows under the 'Shared Drives' settings page I was able to fix this error by re-sharing the drive again.

                – 2b77bee6-5445-4c77-b1eb-4df3e5
                Mar 6 at 13:50











              • Thanks, Sharing the C drive solved my issue too

                – Chandru
                Mar 6 at 15:13














              • 1





                I saw my C drive was being shared, thought it was a mistake and un-shared it via the properties window. Then I ran into this error. Just using the Docker Desktop gui for windows under the 'Shared Drives' settings page I was able to fix this error by re-sharing the drive again.

                – 2b77bee6-5445-4c77-b1eb-4df3e5
                Mar 6 at 13:50











              • Thanks, Sharing the C drive solved my issue too

                – Chandru
                Mar 6 at 15:13








              1




              1





              I saw my C drive was being shared, thought it was a mistake and un-shared it via the properties window. Then I ran into this error. Just using the Docker Desktop gui for windows under the 'Shared Drives' settings page I was able to fix this error by re-sharing the drive again.

              – 2b77bee6-5445-4c77-b1eb-4df3e5
              Mar 6 at 13:50





              I saw my C drive was being shared, thought it was a mistake and un-shared it via the properties window. Then I ran into this error. Just using the Docker Desktop gui for windows under the 'Shared Drives' settings page I was able to fix this error by re-sharing the drive again.

              – 2b77bee6-5445-4c77-b1eb-4df3e5
              Mar 6 at 13:50













              Thanks, Sharing the C drive solved my issue too

              – Chandru
              Mar 6 at 15:13





              Thanks, Sharing the C drive solved my issue too

              – Chandru
              Mar 6 at 15:13











              0














              Did you use this container before? You could try to remove all the docker-volumes before re-executing your command.



              docker volume rm `(docker volume ls -qf dangling=true)`


              I tried your command locally (MacOS) without any error.






              share|improve this answer
























              • Thanks, but unfortunately this didn't help, the output of docker volume ls -qf dangling=true was empty

                – szx
                Jun 15 '18 at 17:22
















              0














              Did you use this container before? You could try to remove all the docker-volumes before re-executing your command.



              docker volume rm `(docker volume ls -qf dangling=true)`


              I tried your command locally (MacOS) without any error.






              share|improve this answer
























              • Thanks, but unfortunately this didn't help, the output of docker volume ls -qf dangling=true was empty

                – szx
                Jun 15 '18 at 17:22














              0












              0








              0







              Did you use this container before? You could try to remove all the docker-volumes before re-executing your command.



              docker volume rm `(docker volume ls -qf dangling=true)`


              I tried your command locally (MacOS) without any error.






              share|improve this answer













              Did you use this container before? You could try to remove all the docker-volumes before re-executing your command.



              docker volume rm `(docker volume ls -qf dangling=true)`


              I tried your command locally (MacOS) without any error.







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Jun 12 '18 at 14:38









              MornorMornor

              1,06721638




              1,06721638













              • Thanks, but unfortunately this didn't help, the output of docker volume ls -qf dangling=true was empty

                – szx
                Jun 15 '18 at 17:22



















              • Thanks, but unfortunately this didn't help, the output of docker volume ls -qf dangling=true was empty

                – szx
                Jun 15 '18 at 17:22

















              Thanks, but unfortunately this didn't help, the output of docker volume ls -qf dangling=true was empty

              – szx
              Jun 15 '18 at 17:22





              Thanks, but unfortunately this didn't help, the output of docker volume ls -qf dangling=true was empty

              – szx
              Jun 15 '18 at 17:22











              0














              I faced this error when another running container was already using folder that is being mounted in docker run command. Please check for the same & if not needed then stop the container. Best solution is to use volume by using following command -



              docker volume create



              then Mount this created volume if required to be used by multiple containers..






              share|improve this answer




























                0














                I faced this error when another running container was already using folder that is being mounted in docker run command. Please check for the same & if not needed then stop the container. Best solution is to use volume by using following command -



                docker volume create



                then Mount this created volume if required to be used by multiple containers..






                share|improve this answer


























                  0












                  0








                  0







                  I faced this error when another running container was already using folder that is being mounted in docker run command. Please check for the same & if not needed then stop the container. Best solution is to use volume by using following command -



                  docker volume create



                  then Mount this created volume if required to be used by multiple containers..






                  share|improve this answer













                  I faced this error when another running container was already using folder that is being mounted in docker run command. Please check for the same & if not needed then stop the container. Best solution is to use volume by using following command -



                  docker volume create



                  then Mount this created volume if required to be used by multiple containers..







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Feb 2 at 17:08









                  Abhishek JainAbhishek Jain

                  41016




                  41016






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Stack Overflow!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f50817985%2fdocker-tries-to-mkdir-the-folder-that-i-mount%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks

                      Calculate evaluation metrics using cross_val_predict sklearn

                      Insert data from modal to MySQL (multiple modal on website)