sudo groupadd docker
sudo chgrp docker /var/run/docker.sock
This lets anyone in the docker
group execute docker commands—much better than sudo
ing everything.
Use a deploy script to automatically:
- Get the repo into working condition (
checkout -f master
, blasting any files in the way) - Pull changes from GitHub
- Build an updated image
- Kill the old container
- Start the newly-pulled container
Use Hook to Deploy to deploy on CI pushes
Build a hook into config.js
that runs the deploy script above when your CI system gives you the green checkmark.