Do I need Vagrant to use a Docker Linux image if I'm on a Windows host?
I use Vagrant to run a CentOS VM so that my dev machine is identical to production.
I want to "switch" to Docker as it appears to do the same job and it's more lightweight.
However, my impression is that Docker makes a container using the host's resources (in my case, Windows). Meaning if I run Docker on my Windows machine, it will use Windows' resources. Therefore, it's not going to be identical to production (which uses "pure" CentOS).
That said, for dev and prod to be truly identical, I need to use a Linux VM (via Vagrant) then install Docker from there, is this correct?
docker vagrant containers virtual-machine
add a comment |
I use Vagrant to run a CentOS VM so that my dev machine is identical to production.
I want to "switch" to Docker as it appears to do the same job and it's more lightweight.
However, my impression is that Docker makes a container using the host's resources (in my case, Windows). Meaning if I run Docker on my Windows machine, it will use Windows' resources. Therefore, it's not going to be identical to production (which uses "pure" CentOS).
That said, for dev and prod to be truly identical, I need to use a Linux VM (via Vagrant) then install Docker from there, is this correct?
docker vagrant containers virtual-machine
The whole point of containers is that it doesn't matter what the host is, other than can it run Windows or Linux containers. If you build a Linux container, then it will behave the same everywhere that Linux containers can run. If you build a Windows container, then it will behave the same everywhere that Windows containers can run. It seems like you should spend some more time researching Docker, perhaps watch some of the great talks given on YouTube. It sounds like it will accomplish what you want, but you should still understand more of how it works.
– mason
Jan 1 at 20:12
add a comment |
I use Vagrant to run a CentOS VM so that my dev machine is identical to production.
I want to "switch" to Docker as it appears to do the same job and it's more lightweight.
However, my impression is that Docker makes a container using the host's resources (in my case, Windows). Meaning if I run Docker on my Windows machine, it will use Windows' resources. Therefore, it's not going to be identical to production (which uses "pure" CentOS).
That said, for dev and prod to be truly identical, I need to use a Linux VM (via Vagrant) then install Docker from there, is this correct?
docker vagrant containers virtual-machine
I use Vagrant to run a CentOS VM so that my dev machine is identical to production.
I want to "switch" to Docker as it appears to do the same job and it's more lightweight.
However, my impression is that Docker makes a container using the host's resources (in my case, Windows). Meaning if I run Docker on my Windows machine, it will use Windows' resources. Therefore, it's not going to be identical to production (which uses "pure" CentOS).
That said, for dev and prod to be truly identical, I need to use a Linux VM (via Vagrant) then install Docker from there, is this correct?
docker vagrant containers virtual-machine
docker vagrant containers virtual-machine
asked Jan 1 at 20:01
IMBIMB
4,350124389
4,350124389
The whole point of containers is that it doesn't matter what the host is, other than can it run Windows or Linux containers. If you build a Linux container, then it will behave the same everywhere that Linux containers can run. If you build a Windows container, then it will behave the same everywhere that Windows containers can run. It seems like you should spend some more time researching Docker, perhaps watch some of the great talks given on YouTube. It sounds like it will accomplish what you want, but you should still understand more of how it works.
– mason
Jan 1 at 20:12
add a comment |
The whole point of containers is that it doesn't matter what the host is, other than can it run Windows or Linux containers. If you build a Linux container, then it will behave the same everywhere that Linux containers can run. If you build a Windows container, then it will behave the same everywhere that Windows containers can run. It seems like you should spend some more time researching Docker, perhaps watch some of the great talks given on YouTube. It sounds like it will accomplish what you want, but you should still understand more of how it works.
– mason
Jan 1 at 20:12
The whole point of containers is that it doesn't matter what the host is, other than can it run Windows or Linux containers. If you build a Linux container, then it will behave the same everywhere that Linux containers can run. If you build a Windows container, then it will behave the same everywhere that Windows containers can run. It seems like you should spend some more time researching Docker, perhaps watch some of the great talks given on YouTube. It sounds like it will accomplish what you want, but you should still understand more of how it works.
– mason
Jan 1 at 20:12
The whole point of containers is that it doesn't matter what the host is, other than can it run Windows or Linux containers. If you build a Linux container, then it will behave the same everywhere that Linux containers can run. If you build a Windows container, then it will behave the same everywhere that Windows containers can run. It seems like you should spend some more time researching Docker, perhaps watch some of the great talks given on YouTube. It sounds like it will accomplish what you want, but you should still understand more of how it works.
– mason
Jan 1 at 20:12
add a comment |
1 Answer
1
active
oldest
votes
Docker for windows uses a virtual machine (HyperV) when you use it. It's a linux distro.
For this to work, you need to have windows pro though, as home does not come with HyperV.
If you use a windows home installation, you could instead use 'Docker Toolbox', which uses virtual box instead of HyperV. It works okay, but I think there are some limitations and performance differences between the two solutions.
I can Vagrant so I guess I can run Docker? Anyway do you mean to say my assumption is wrong and that even if I'm on Windows, I will still get a full CentOS experience that is identical to production (if production also uses the same Docker image)?
– IMB
Jan 1 at 20:12
If you have no experience of docker, I recommend reading up on it a bit before swapping from vagrant. But yes, even if you run on windows, the built container will work just as if it was built and running on a CentOS machine.
– Jite
Jan 1 at 20:19
If you expect "a full CentOS experience" then I would stick with your Vagrant/VM solution; the process of setting up Docker containers can be substantially different. That's doubly true if you're not actually changing your production environment to be Docker-based.
– David Maze
Jan 1 at 20:25
I did read quite a bit and this image kinda summarized my assumption. The 3rd column gave me an impression that I need to install a VM first but what you're saying is that Docker does this automatically if the host is on Windows?
– IMB
Jan 1 at 20:25
@DavidMaze I plan to make the production also Docker-based.
– IMB
Jan 1 at 20:26
|
show 1 more 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%2f53998545%2fdo-i-need-vagrant-to-use-a-docker-linux-image-if-im-on-a-windows-host%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 uses a virtual machine (HyperV) when you use it. It's a linux distro.
For this to work, you need to have windows pro though, as home does not come with HyperV.
If you use a windows home installation, you could instead use 'Docker Toolbox', which uses virtual box instead of HyperV. It works okay, but I think there are some limitations and performance differences between the two solutions.
I can Vagrant so I guess I can run Docker? Anyway do you mean to say my assumption is wrong and that even if I'm on Windows, I will still get a full CentOS experience that is identical to production (if production also uses the same Docker image)?
– IMB
Jan 1 at 20:12
If you have no experience of docker, I recommend reading up on it a bit before swapping from vagrant. But yes, even if you run on windows, the built container will work just as if it was built and running on a CentOS machine.
– Jite
Jan 1 at 20:19
If you expect "a full CentOS experience" then I would stick with your Vagrant/VM solution; the process of setting up Docker containers can be substantially different. That's doubly true if you're not actually changing your production environment to be Docker-based.
– David Maze
Jan 1 at 20:25
I did read quite a bit and this image kinda summarized my assumption. The 3rd column gave me an impression that I need to install a VM first but what you're saying is that Docker does this automatically if the host is on Windows?
– IMB
Jan 1 at 20:25
@DavidMaze I plan to make the production also Docker-based.
– IMB
Jan 1 at 20:26
|
show 1 more comment
Docker for windows uses a virtual machine (HyperV) when you use it. It's a linux distro.
For this to work, you need to have windows pro though, as home does not come with HyperV.
If you use a windows home installation, you could instead use 'Docker Toolbox', which uses virtual box instead of HyperV. It works okay, but I think there are some limitations and performance differences between the two solutions.
I can Vagrant so I guess I can run Docker? Anyway do you mean to say my assumption is wrong and that even if I'm on Windows, I will still get a full CentOS experience that is identical to production (if production also uses the same Docker image)?
– IMB
Jan 1 at 20:12
If you have no experience of docker, I recommend reading up on it a bit before swapping from vagrant. But yes, even if you run on windows, the built container will work just as if it was built and running on a CentOS machine.
– Jite
Jan 1 at 20:19
If you expect "a full CentOS experience" then I would stick with your Vagrant/VM solution; the process of setting up Docker containers can be substantially different. That's doubly true if you're not actually changing your production environment to be Docker-based.
– David Maze
Jan 1 at 20:25
I did read quite a bit and this image kinda summarized my assumption. The 3rd column gave me an impression that I need to install a VM first but what you're saying is that Docker does this automatically if the host is on Windows?
– IMB
Jan 1 at 20:25
@DavidMaze I plan to make the production also Docker-based.
– IMB
Jan 1 at 20:26
|
show 1 more comment
Docker for windows uses a virtual machine (HyperV) when you use it. It's a linux distro.
For this to work, you need to have windows pro though, as home does not come with HyperV.
If you use a windows home installation, you could instead use 'Docker Toolbox', which uses virtual box instead of HyperV. It works okay, but I think there are some limitations and performance differences between the two solutions.
Docker for windows uses a virtual machine (HyperV) when you use it. It's a linux distro.
For this to work, you need to have windows pro though, as home does not come with HyperV.
If you use a windows home installation, you could instead use 'Docker Toolbox', which uses virtual box instead of HyperV. It works okay, but I think there are some limitations and performance differences between the two solutions.
answered Jan 1 at 20:05
JiteJite
4,78721731
4,78721731
I can Vagrant so I guess I can run Docker? Anyway do you mean to say my assumption is wrong and that even if I'm on Windows, I will still get a full CentOS experience that is identical to production (if production also uses the same Docker image)?
– IMB
Jan 1 at 20:12
If you have no experience of docker, I recommend reading up on it a bit before swapping from vagrant. But yes, even if you run on windows, the built container will work just as if it was built and running on a CentOS machine.
– Jite
Jan 1 at 20:19
If you expect "a full CentOS experience" then I would stick with your Vagrant/VM solution; the process of setting up Docker containers can be substantially different. That's doubly true if you're not actually changing your production environment to be Docker-based.
– David Maze
Jan 1 at 20:25
I did read quite a bit and this image kinda summarized my assumption. The 3rd column gave me an impression that I need to install a VM first but what you're saying is that Docker does this automatically if the host is on Windows?
– IMB
Jan 1 at 20:25
@DavidMaze I plan to make the production also Docker-based.
– IMB
Jan 1 at 20:26
|
show 1 more comment
I can Vagrant so I guess I can run Docker? Anyway do you mean to say my assumption is wrong and that even if I'm on Windows, I will still get a full CentOS experience that is identical to production (if production also uses the same Docker image)?
– IMB
Jan 1 at 20:12
If you have no experience of docker, I recommend reading up on it a bit before swapping from vagrant. But yes, even if you run on windows, the built container will work just as if it was built and running on a CentOS machine.
– Jite
Jan 1 at 20:19
If you expect "a full CentOS experience" then I would stick with your Vagrant/VM solution; the process of setting up Docker containers can be substantially different. That's doubly true if you're not actually changing your production environment to be Docker-based.
– David Maze
Jan 1 at 20:25
I did read quite a bit and this image kinda summarized my assumption. The 3rd column gave me an impression that I need to install a VM first but what you're saying is that Docker does this automatically if the host is on Windows?
– IMB
Jan 1 at 20:25
@DavidMaze I plan to make the production also Docker-based.
– IMB
Jan 1 at 20:26
I can Vagrant so I guess I can run Docker? Anyway do you mean to say my assumption is wrong and that even if I'm on Windows, I will still get a full CentOS experience that is identical to production (if production also uses the same Docker image)?
– IMB
Jan 1 at 20:12
I can Vagrant so I guess I can run Docker? Anyway do you mean to say my assumption is wrong and that even if I'm on Windows, I will still get a full CentOS experience that is identical to production (if production also uses the same Docker image)?
– IMB
Jan 1 at 20:12
If you have no experience of docker, I recommend reading up on it a bit before swapping from vagrant. But yes, even if you run on windows, the built container will work just as if it was built and running on a CentOS machine.
– Jite
Jan 1 at 20:19
If you have no experience of docker, I recommend reading up on it a bit before swapping from vagrant. But yes, even if you run on windows, the built container will work just as if it was built and running on a CentOS machine.
– Jite
Jan 1 at 20:19
If you expect "a full CentOS experience" then I would stick with your Vagrant/VM solution; the process of setting up Docker containers can be substantially different. That's doubly true if you're not actually changing your production environment to be Docker-based.
– David Maze
Jan 1 at 20:25
If you expect "a full CentOS experience" then I would stick with your Vagrant/VM solution; the process of setting up Docker containers can be substantially different. That's doubly true if you're not actually changing your production environment to be Docker-based.
– David Maze
Jan 1 at 20:25
I did read quite a bit and this image kinda summarized my assumption. The 3rd column gave me an impression that I need to install a VM first but what you're saying is that Docker does this automatically if the host is on Windows?
– IMB
Jan 1 at 20:25
I did read quite a bit and this image kinda summarized my assumption. The 3rd column gave me an impression that I need to install a VM first but what you're saying is that Docker does this automatically if the host is on Windows?
– IMB
Jan 1 at 20:25
@DavidMaze I plan to make the production also Docker-based.
– IMB
Jan 1 at 20:26
@DavidMaze I plan to make the production also Docker-based.
– IMB
Jan 1 at 20:26
|
show 1 more 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%2f53998545%2fdo-i-need-vagrant-to-use-a-docker-linux-image-if-im-on-a-windows-host%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
The whole point of containers is that it doesn't matter what the host is, other than can it run Windows or Linux containers. If you build a Linux container, then it will behave the same everywhere that Linux containers can run. If you build a Windows container, then it will behave the same everywhere that Windows containers can run. It seems like you should spend some more time researching Docker, perhaps watch some of the great talks given on YouTube. It sounds like it will accomplish what you want, but you should still understand more of how it works.
– mason
Jan 1 at 20:12