Fig – Fast, isolated development environments using Docker
github.com
github.com
When I want to start work on a project:
fig up -d db
fig up -d redis
fig up web
One of the main benefits for me using fig/docker is that I only have a single VM on my machine, rather than one for each project. I usually just leave it running in the background.Combined with docker-osx https://github.com/noplay/docker-osx I don't even need to ssh into my VM to start work.
They just integrated nfs support though
[1] https://github.com/centurylinklabs/fig2coreos
[2] http://www.centurylinklabs.com/building-complex-apps-for-doc...
Docker can run within a VM, or on your computer if you're not on a Macintosh (Mac's kernel is...for now...not supported). I usually create a Vagrant virtual machine of CoreOS, which works with Docker very nicely.
Docker is a utility which uses "containers". Docker containers are usually used to run one process at a time (apache or mysql or python or grep or anything, really).
You can connect multiple docker containers to create a functioning app. Running one for database and other one for running your code would a simple example.
Fig tries to make the process of making Docker instances work together easy.
Docker is built upon features available only in the Linux kernel (LXC, cgroups)
Docker is afaik Linux only and uses some kind of container virtualization that makes it possible to run services in a separated virtual enviroment on a per process basis without the need to spin up a full vm with all the overhead. Also these docker containers seem to be portable to different machines pretty easily, making it easy to share enviroments among developers.
Now Fig looks like something to make managing docker containers easier.
vagrant is a manager for vms. it lets you manage vms (by default on virtualbox, but you can use other vm hosts too).
docker is a manager for linux containers. linux containers are linux only and a bit like chroot on steroids - they use the same linux kernel as the host, but with a different file system. so they're like lightweight, linux-only, vms. they're so lightweight that they're being "sold" as containers for single applications (so you then use docker like a package management service, installing postgres, for example, as a docker container - often this can use a separate vm as the host, so that you're not making changes to your main machine, or because you're using a mac).
fig is new to me but seems to be a wrapper around docker that simplifies some things.
the above is a simplification - for example, i'm pretty sure vagrant these days can also manage docker images (linux containers + docker metadata).
Is it possible to have multiple independent web apps talking to one postgres and one redis installation?
I have a VPS with ~10 tiny websites, and it would be total overkill to bundle each app with its own db and caching. How would you reference that same "external" db in a fig configuration?