Whether you pair or not I think this post is worth reading. Do you ever have needs like this?
- Ability to create on-demand dev environments with all your dependencies in place?
- Ability to collaborate with local or remote folks in a low latency environment that doesn’t suck?
- Want bare metal performance instead of using a VM?
- Want to kick off that build, close your laptop and head home to check on it later?
- Want to share your work on your dev environment w/ others easily, even with your laptop in your backpack?
There are a bunch more reasons you might like docker-spoon, those are just a few.
This tool grew out of a desire to streamline developer workstation setup but it went even further to the point where developer environments are disposable, can be provisioned in seconds & allow local and remote pairing at any time. Are there other ways to do this? Yep. I’ve seen this tool used successfully by entire dev teams at two companies now – it’s new to you but it’s been around a bit.
The idea behind docker-spoon is pretty basic, you create a docker image with all your developer needs built into it, then you run
spoon <name> where
name is the name you assign to a new spoon instance running in Docker. Spoon does all the heavy lifting – currently including:
- Check to see if the container exists, if not create it
- Forward any exposed ports
- Copy any files you want copied on creation into the new instance & add your ssh public key for future connections
- Run any commands you want run on container creation
- establish an ssh connection into the container
So after installing spoon and creating a config, the time from running spoon to being at a command prompt in your new dev environment is about a few seconds. How easy is it? Demo time!
Video can be viewed directly here
There are some features not shown in this demo which already exist:
- Forward ports over ssh which aren’t exposed via ssh
- Run commands on container creation
- Using spoon to execute docker builds
That demo used the example docker container included in the docker-spoon repository. If you want to try it out quickly just follow the directions in the docker-spoon repo.
So here’s the thing, there are some caveats – all this awesomeness doesn’t come without some conditions. Spoon takes advantage of the idea that working in a terminal with tmux is low latency & easily shared. There is some work being done to use VNC inside spoon to allow for the use of GUI apps but that’s not the optimal use case.
If you find docker-spoon useful let me know. If you want to see something different, submit a pull request or shoot me a note. The usage should be thoroughly documented in the README.