#Docker Development Container This is a Dockerfile for a container that is run specifically for the development process. As containerization became more popular, it has become evident that nearly all aspects of programming can be containerized. This project specifically is geared towards removing the need for local npm setup with a task running. Using this image, a team can create a specific environment for their project and then distribute this image amongst all team members.
##Usage This project can be used in conjunction with a docker-compose file, or simply by itself. To run this container build it through docker.
$ docker build .
Further, I would recommend naming this container so that it is easier to access and run commands inside.
A docker-compose.yml has also been provided with the necessary inputs to run this in a different project. Copy the code contained in that file to your docker-compose.yml for your project.
##Notes
It is highly recommended that you change the mounted volumes to NFS. This drastically increases the speed by which the voluming syncing occurs. Without NFS, the mount will take significantly longer and slow the development process. Due to Dinghy not allowing maproot=0 (yet), there are issues running npm with Dinghy. Thus currently only docker-machine-nfs can be recommend for mounting volumes with nfs. Further, it is important to change the mount settings so that gulp can respond to change files in a reasonable time. By changing the mount settings, Gulp can be reduced from a 1 minute response time to roughly 50 ms response time. See this (pull request)[adlogix/docker-machine-nfs#38] for further details.
If you would like to have the script added only in development and avoid manually removing the script for production, add a directory name 'inject' in your base directory and include the file with the browser-sync script in the BrowserSync-Injection-Example folder. Then simply include
<!-- build:js -->
<!--endbuild -->
before the closing body tag of your index.
##Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
The code is available under the MIT License.