admin管理员组文章数量:1425717
I am playing around with a MEAN javascript project. (mongoDB + angular + sails.js + node.js) As I am offline a lot of the time, I'd like to keep my dev environment, running in a docker container, on OS X laptop, using boot2docker.
The 'production' (not actual production, just somewhere I deploy to to show it to friends) is a Digital Ocean droplet running Ubuntu as host and hopefully the same docker container.
I expect that the environment won't change very often and that I can continue using git push/pull to push just the code changes.
Do I need anything else other than what I described above? Do I need Vagrant, for example to deploy that docker container or is that an overkill? Can docker specify all all my needs, that is the right version of node.js, sails etc? Is there a ready made container I can reuse or modify rather than starting from scratch?
I am playing around with a MEAN javascript project. (mongoDB + angular + sails.js + node.js) As I am offline a lot of the time, I'd like to keep my dev environment, running in a docker container, on OS X laptop, using boot2docker.
The 'production' (not actual production, just somewhere I deploy to to show it to friends) is a Digital Ocean droplet running Ubuntu as host and hopefully the same docker container.
I expect that the environment won't change very often and that I can continue using git push/pull to push just the code changes.
Do I need anything else other than what I described above? Do I need Vagrant, for example to deploy that docker container or is that an overkill? Can docker specify all all my needs, that is the right version of node.js, sails etc? Is there a ready made container I can reuse or modify rather than starting from scratch?
Share Improve this question edited Apr 4, 2015 at 0:50 Travis Webb 15k9 gold badges59 silver badges111 bronze badges asked Mar 9, 2015 at 13:11 Lech RzedzickiLech Rzedzicki 4356 silver badges17 bronze badges1 Answer
Reset to default 5Answers to your questions:
Do I need anything else other than what I described above?
What you described sounds very reasonable. But keep in mind that you don't want to use one docker container, but rather one container per service. That means: one container running mongo, one container running node, and so on. That is a Docker best practice.
Do I need Vagrant, for example to deploy that docker container or is that an overkill?
It sounds like your rather simple setup does not require Vagrant. You can use Dockerfiles to build images that have everything you need installed. See the Dockerfile Reference and Dockerfile best Practices.
Can docker specify all my needs, that is the right version of node.js, sails etc?
Yes, every Docker image has a certain version of the service that will run inside the container. That's one of the points of using containers.
Is there a ready made container I can reuse or modify rather than starting from scratch?
Yes, there are many ready made containers to be found on the Docker Hub. Use these images as a base when writing your Dockerfiles to install anything additionally to what is supplied within the image on Docker Hub.
Also, check out Volumes to figure out how to handle source code in development.
本文标签:
版权声明:本文标题:javascript - What is the most simple setup for a MEAN stack docker container to have the same config on OS X and DigitalOcean? - 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745405459a2657229.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论