[Vuejs]-Why do tutorials that dockerize Node.js require you to also install Node.js on the host?

0👍

Like you say, it is redundant but easier. A container is a running instance of an image, an image that was created (probably) using a Dockerfile with the instructions, so how would you go about doing everything from the container?

Would you add the creation of the app to the Dockerfile or would you connect to the container using bash and run the commands from there? If you connect with bash you’ll lost everything once you remove the container. Once your app is created inside your container how would you get it out? I mean you need to write your app’s code. You could store you data using docker volumes but that gets complicated depending were you are running Docker. For example on Mac a virtual machine is created for Docker, so to find that data you’ll need to connect to the virtual machine…

It is just easier to do all of that from your local machine and use docker to host your app.

Leave a comment