soos v2.1.0
Soos
Docker driven development
Why another strange named thingy? Why?
Because npm install is slow and I mean terribly slow when you try to use it properly with Docker for development.
Which means that you should run npm install every time you will create Docker container, or change branch, to have truly clean environment. When you have Docker images with node_modules baked in, you can skip this step and avoid all npm install issues. Only tricky part is how to build and run these images and how to mark them, so you, fellow developers and ci servers can reuse them.
Using Soos will simplify all of that, apart from building image it will also allow you to run image with right node_modules with single command in miliseconds. As a bonus you are forced into Docker driven development, which is speeding up onboarding and preventing issues caused by different environment setup.
What it does then?
Soos will do following
- Initalize
Dockerfileand.dockerignorefor your project - Build docker image with
node_modulesbaked in and will use shasum ofpackage.jsonfile as docker image tag, so you can easily switch between revisions ( see list of Soos own Docker images https://hub.docker.com/r/ngparty/soos/tags/ ) - Run docker container for your specific
package.json
!!! Setup Docker Toolbox on your machine first !!!
Install
$ npm i soos -g
Init
Your/Project $ soos -i
Build docker image
Your/Project $ soos -b
Push/Publish docker image to Docker Hub
Your/Project $ soos -P
Start docker container with npm install
Your/Project $ soos
Start docker container
with bash shell and with forwarded port 8080
Your/Project $ soos -c bash -p 8080
or
Your/Project $ soos -s -p 8080
Usage: soos [options]
Options:
--init, -i add dockerfile [boolean]
--build, -b build docker image [boolean]
--push, -P push docker image [boolean]
--command, -c command to run inside of docker [array]
--shell, -s run bash command inside of docker [boolean]
--port, -p port forwarding [string]
--help, -h Show help [boolean]
Examples:
soos -i && soos -b && soos -c bash Will build docker image and then start
docker machine with bash