How to use -v volumes parameter in docker on Windows Subsystem for Linux
My windows 10 version is 1803
I install docker fellow the link:
https://nickjanetakis.com/blog/setting-up-docker-for-windows-and-wsl-to-work-flawlessly
I try to use -v of docker like:
docker run -it -v ~/.aws:root/.aws/ ubuntu
I also try to use:
docker run -it -v $(realpath ~/.aws):/root/.aws ubuntu
But I find the volumes I want to mapping to docker system is not there.
when I do:
ls /root/.aws
there is always empty, how to mapping the data volumes on Windows Subsystem for linux?
docker volume windows-subsystem-for-linux
add a comment |
My windows 10 version is 1803
I install docker fellow the link:
https://nickjanetakis.com/blog/setting-up-docker-for-windows-and-wsl-to-work-flawlessly
I try to use -v of docker like:
docker run -it -v ~/.aws:root/.aws/ ubuntu
I also try to use:
docker run -it -v $(realpath ~/.aws):/root/.aws ubuntu
But I find the volumes I want to mapping to docker system is not there.
when I do:
ls /root/.aws
there is always empty, how to mapping the data volumes on Windows Subsystem for linux?
docker volume windows-subsystem-for-linux
Not sure of that, not a windows user, but docker run volume mapping format is-v <host-path>:<container-path>
, thus I guess it might be smth. like, with windows inverted backslash flavor:docker run -it -v 'c:/foo/bar/aws':/root/.aws ubuntu
– agg3l
Nov 26 '18 at 0:06
the ~/.aws is not mapping in c:/foo/bar/.aws
– user504909
Nov 26 '18 at 0:20
vice versa, as I understand; you're trying to map some directory on Windows to Docker container, aren't you? Anyway, despite windows is not native Docker habitat, I believe you're missing something trivial here
– agg3l
Nov 26 '18 at 1:19
actually, I use subsystem Linux on widnows, I try to mapping the subsystem Linux directory to docker Container
– user504909
Nov 26 '18 at 2:57
The simple answer is WSL does not nicely work together with docker for windows. (At least I have not found a way). You can however mount native windows directories as docker volumes when you work in the windows shell..
– Henry
Nov 26 '18 at 5:53
add a comment |
My windows 10 version is 1803
I install docker fellow the link:
https://nickjanetakis.com/blog/setting-up-docker-for-windows-and-wsl-to-work-flawlessly
I try to use -v of docker like:
docker run -it -v ~/.aws:root/.aws/ ubuntu
I also try to use:
docker run -it -v $(realpath ~/.aws):/root/.aws ubuntu
But I find the volumes I want to mapping to docker system is not there.
when I do:
ls /root/.aws
there is always empty, how to mapping the data volumes on Windows Subsystem for linux?
docker volume windows-subsystem-for-linux
My windows 10 version is 1803
I install docker fellow the link:
https://nickjanetakis.com/blog/setting-up-docker-for-windows-and-wsl-to-work-flawlessly
I try to use -v of docker like:
docker run -it -v ~/.aws:root/.aws/ ubuntu
I also try to use:
docker run -it -v $(realpath ~/.aws):/root/.aws ubuntu
But I find the volumes I want to mapping to docker system is not there.
when I do:
ls /root/.aws
there is always empty, how to mapping the data volumes on Windows Subsystem for linux?
docker volume windows-subsystem-for-linux
docker volume windows-subsystem-for-linux
edited Nov 26 '18 at 5:36
user504909
asked Nov 25 '18 at 23:51
user504909user504909
2,08153362
2,08153362
Not sure of that, not a windows user, but docker run volume mapping format is-v <host-path>:<container-path>
, thus I guess it might be smth. like, with windows inverted backslash flavor:docker run -it -v 'c:/foo/bar/aws':/root/.aws ubuntu
– agg3l
Nov 26 '18 at 0:06
the ~/.aws is not mapping in c:/foo/bar/.aws
– user504909
Nov 26 '18 at 0:20
vice versa, as I understand; you're trying to map some directory on Windows to Docker container, aren't you? Anyway, despite windows is not native Docker habitat, I believe you're missing something trivial here
– agg3l
Nov 26 '18 at 1:19
actually, I use subsystem Linux on widnows, I try to mapping the subsystem Linux directory to docker Container
– user504909
Nov 26 '18 at 2:57
The simple answer is WSL does not nicely work together with docker for windows. (At least I have not found a way). You can however mount native windows directories as docker volumes when you work in the windows shell..
– Henry
Nov 26 '18 at 5:53
add a comment |
Not sure of that, not a windows user, but docker run volume mapping format is-v <host-path>:<container-path>
, thus I guess it might be smth. like, with windows inverted backslash flavor:docker run -it -v 'c:/foo/bar/aws':/root/.aws ubuntu
– agg3l
Nov 26 '18 at 0:06
the ~/.aws is not mapping in c:/foo/bar/.aws
– user504909
Nov 26 '18 at 0:20
vice versa, as I understand; you're trying to map some directory on Windows to Docker container, aren't you? Anyway, despite windows is not native Docker habitat, I believe you're missing something trivial here
– agg3l
Nov 26 '18 at 1:19
actually, I use subsystem Linux on widnows, I try to mapping the subsystem Linux directory to docker Container
– user504909
Nov 26 '18 at 2:57
The simple answer is WSL does not nicely work together with docker for windows. (At least I have not found a way). You can however mount native windows directories as docker volumes when you work in the windows shell..
– Henry
Nov 26 '18 at 5:53
Not sure of that, not a windows user, but docker run volume mapping format is
-v <host-path>:<container-path>
, thus I guess it might be smth. like, with windows inverted backslash flavor: docker run -it -v 'c:/foo/bar/aws':/root/.aws ubuntu
– agg3l
Nov 26 '18 at 0:06
Not sure of that, not a windows user, but docker run volume mapping format is
-v <host-path>:<container-path>
, thus I guess it might be smth. like, with windows inverted backslash flavor: docker run -it -v 'c:/foo/bar/aws':/root/.aws ubuntu
– agg3l
Nov 26 '18 at 0:06
the ~/.aws is not mapping in c:/foo/bar/.aws
– user504909
Nov 26 '18 at 0:20
the ~/.aws is not mapping in c:/foo/bar/.aws
– user504909
Nov 26 '18 at 0:20
vice versa, as I understand; you're trying to map some directory on Windows to Docker container, aren't you? Anyway, despite windows is not native Docker habitat, I believe you're missing something trivial here
– agg3l
Nov 26 '18 at 1:19
vice versa, as I understand; you're trying to map some directory on Windows to Docker container, aren't you? Anyway, despite windows is not native Docker habitat, I believe you're missing something trivial here
– agg3l
Nov 26 '18 at 1:19
actually, I use subsystem Linux on widnows, I try to mapping the subsystem Linux directory to docker Container
– user504909
Nov 26 '18 at 2:57
actually, I use subsystem Linux on widnows, I try to mapping the subsystem Linux directory to docker Container
– user504909
Nov 26 '18 at 2:57
The simple answer is WSL does not nicely work together with docker for windows. (At least I have not found a way). You can however mount native windows directories as docker volumes when you work in the windows shell..
– Henry
Nov 26 '18 at 5:53
The simple answer is WSL does not nicely work together with docker for windows. (At least I have not found a way). You can however mount native windows directories as docker volumes when you work in the windows shell..
– Henry
Nov 26 '18 at 5:53
add a comment |
1 Answer
1
active
oldest
votes
Docker for Windows runs atop Windows itself but has no knowledge of WSL.
In WSL:
- Distros can see the contents of Windows "drives" via the automatically mounted drives under
/mnt/<drive-letter>
- Windows currently cannot reach into the filesystems of installed Linux distros. We're working to remedy this in future releases ;)
While Docker Engine itself cannot run within WSL, you can install Docker for Windows, and operate it from within WSL using the docker
command-line tool, specifying the hostname via the -h
argument, or export to DOCKER_HOST
in your .bashrc
.
You may find some of these tutorials useful:
- "Setting Up Docker for Windows and WSL to Work Flawlessly" by @nickjanetakis
- "Running Docker containers on Bash on Windows" by @jayway
- "Docker in WSL" by @wizardsoftheweb
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%2f53473180%2fhow-to-use-v-volumes-parameter-in-docker-on-windows-subsystem-for-linux%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Docker for Windows runs atop Windows itself but has no knowledge of WSL.
In WSL:
- Distros can see the contents of Windows "drives" via the automatically mounted drives under
/mnt/<drive-letter>
- Windows currently cannot reach into the filesystems of installed Linux distros. We're working to remedy this in future releases ;)
While Docker Engine itself cannot run within WSL, you can install Docker for Windows, and operate it from within WSL using the docker
command-line tool, specifying the hostname via the -h
argument, or export to DOCKER_HOST
in your .bashrc
.
You may find some of these tutorials useful:
- "Setting Up Docker for Windows and WSL to Work Flawlessly" by @nickjanetakis
- "Running Docker containers on Bash on Windows" by @jayway
- "Docker in WSL" by @wizardsoftheweb
add a comment |
Docker for Windows runs atop Windows itself but has no knowledge of WSL.
In WSL:
- Distros can see the contents of Windows "drives" via the automatically mounted drives under
/mnt/<drive-letter>
- Windows currently cannot reach into the filesystems of installed Linux distros. We're working to remedy this in future releases ;)
While Docker Engine itself cannot run within WSL, you can install Docker for Windows, and operate it from within WSL using the docker
command-line tool, specifying the hostname via the -h
argument, or export to DOCKER_HOST
in your .bashrc
.
You may find some of these tutorials useful:
- "Setting Up Docker for Windows and WSL to Work Flawlessly" by @nickjanetakis
- "Running Docker containers on Bash on Windows" by @jayway
- "Docker in WSL" by @wizardsoftheweb
add a comment |
Docker for Windows runs atop Windows itself but has no knowledge of WSL.
In WSL:
- Distros can see the contents of Windows "drives" via the automatically mounted drives under
/mnt/<drive-letter>
- Windows currently cannot reach into the filesystems of installed Linux distros. We're working to remedy this in future releases ;)
While Docker Engine itself cannot run within WSL, you can install Docker for Windows, and operate it from within WSL using the docker
command-line tool, specifying the hostname via the -h
argument, or export to DOCKER_HOST
in your .bashrc
.
You may find some of these tutorials useful:
- "Setting Up Docker for Windows and WSL to Work Flawlessly" by @nickjanetakis
- "Running Docker containers on Bash on Windows" by @jayway
- "Docker in WSL" by @wizardsoftheweb
Docker for Windows runs atop Windows itself but has no knowledge of WSL.
In WSL:
- Distros can see the contents of Windows "drives" via the automatically mounted drives under
/mnt/<drive-letter>
- Windows currently cannot reach into the filesystems of installed Linux distros. We're working to remedy this in future releases ;)
While Docker Engine itself cannot run within WSL, you can install Docker for Windows, and operate it from within WSL using the docker
command-line tool, specifying the hostname via the -h
argument, or export to DOCKER_HOST
in your .bashrc
.
You may find some of these tutorials useful:
- "Setting Up Docker for Windows and WSL to Work Flawlessly" by @nickjanetakis
- "Running Docker containers on Bash on Windows" by @jayway
- "Docker in WSL" by @wizardsoftheweb
answered Nov 29 '18 at 22:45
Rich TurnerRich Turner
8,54913857
8,54913857
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%2f53473180%2fhow-to-use-v-volumes-parameter-in-docker-on-windows-subsystem-for-linux%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
Not sure of that, not a windows user, but docker run volume mapping format is
-v <host-path>:<container-path>
, thus I guess it might be smth. like, with windows inverted backslash flavor:docker run -it -v 'c:/foo/bar/aws':/root/.aws ubuntu
– agg3l
Nov 26 '18 at 0:06
the ~/.aws is not mapping in c:/foo/bar/.aws
– user504909
Nov 26 '18 at 0:20
vice versa, as I understand; you're trying to map some directory on Windows to Docker container, aren't you? Anyway, despite windows is not native Docker habitat, I believe you're missing something trivial here
– agg3l
Nov 26 '18 at 1:19
actually, I use subsystem Linux on widnows, I try to mapping the subsystem Linux directory to docker Container
– user504909
Nov 26 '18 at 2:57
The simple answer is WSL does not nicely work together with docker for windows. (At least I have not found a way). You can however mount native windows directories as docker volumes when you work in the windows shell..
– Henry
Nov 26 '18 at 5:53