Do I need Vagrant to use a Docker Linux image if I'm on a Windows host?












0















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?










share|improve this question























  • 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


















0















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?










share|improve this question























  • 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
















0












0








0








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?










share|improve this question














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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










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





















  • 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














1 Answer
1






active

oldest

votes


















0














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.






share|improve this answer
























  • 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











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%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









0














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.






share|improve this answer
























  • 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
















0














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.






share|improve this answer
























  • 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














0












0








0







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.






share|improve this answer













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.







share|improve this answer












share|improve this answer



share|improve this answer










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



















  • 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




















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%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





















































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

MongoDB - Not Authorized To Execute Command

How to fix TextFormField cause rebuild widget in Flutter

Npm cannot find a required file even through it is in the searched directory