Docker tries to mkdir the folder that I mount
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
add a comment |
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
Did you resolve this issue? I got the same
– ferprez
Nov 28 '18 at 16:30
add a comment |
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
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
docker docker-windows
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
add a comment |
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
add a comment |
4 Answers
4
active
oldest
votes
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.
add a comment |
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".
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
add a comment |
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.
Thanks, but unfortunately this didn't help, the output ofdocker volume ls -qf dangling=true
was empty
– szx
Jun 15 '18 at 17:22
add a comment |
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..
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
add a comment |
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.
add a comment |
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.
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.
answered Dec 17 '18 at 22:00
melicentmelicent
386414
386414
add a comment |
add a comment |
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".
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
add a comment |
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".
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
add a comment |
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".
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".
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
add a comment |
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
add a comment |
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.
Thanks, but unfortunately this didn't help, the output ofdocker volume ls -qf dangling=true
was empty
– szx
Jun 15 '18 at 17:22
add a comment |
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.
Thanks, but unfortunately this didn't help, the output ofdocker volume ls -qf dangling=true
was empty
– szx
Jun 15 '18 at 17:22
add a comment |
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.
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.
answered Jun 12 '18 at 14:38
MornorMornor
1,06721638
1,06721638
Thanks, but unfortunately this didn't help, the output ofdocker volume ls -qf dangling=true
was empty
– szx
Jun 15 '18 at 17:22
add a comment |
Thanks, but unfortunately this didn't help, the output ofdocker 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
add a comment |
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..
add a comment |
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..
add a comment |
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..
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..
answered Feb 2 at 17:08
Abhishek JainAbhishek Jain
41016
41016
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
Did you resolve this issue? I got the same
– ferprez
Nov 28 '18 at 16:30