News for hackers. Stuff that matters.
Re:Fig 1.0: Boot2docker compatibility and more by kolev on Friday October 17, 2014 @03:15PM (#8472828)
I'm not sure why Fig got so popular, when Crane [1] was on Go since day one, is actively developed, and pretty much does the same thing maybe even better. I haven't seen the latest Fig features though. Maybe Fig finally does more, but ideally they should merge especially when Fig is planning to migrate to Go!

[1] https://github.com/michaelsauter/crane

Re:Fig 1.0: Boot2docker compatibility and more by nickstinemates on Friday October 17, 2014 @04:46PM (#8473265)
I didn't know about Crane. Time to go play with that!
Re:Fig 1.0: Boot2docker compatibility and more by cnp on Friday October 17, 2014 @04:58PM (#8473342)
Crane looks so perfectly simple and sweet
Re:Fig 1.0: Boot2docker compatibility and more by throwaway1979 on Friday October 17, 2014 @02:51PM (#8472713)
Why does the fig documentation emphasis development environments. Isn't fig a general orchestration tool for deploying containers on a single host?
Re:Fig 1.0: Boot2docker compatibility and more by zenlikethat on Friday October 17, 2014 @05:01PM (#8473356)
fig generally gets used for development environments since it's relatively easy to install docker, install fig, clone a repo and run `fig up` and get that application running correctly with all of its dependencies including database, background workers, etc. No more of the old "ok, install postgres, install the right gems, etc. just to make some small change in this project" song and dance!

However, it's perfectly suited to run in production for small to medium sized applications. You can even see a sample "Deploy on git push using fig" that I put together here:

https://github.com/nathanleclaire/laraveldocker

It's fun!

Re:Fig 1.0: Boot2docker compatibility and more by enos_feedler on Friday October 17, 2014 @03:27PM (#8472876)
How many production environments deploy all containers on a single host?
Re:Fig 1.0: Boot2docker compatibility and more by TheMakeA on Saturday October 18, 2014 @02:02AM (#8474743)
There's fig2coreos[1] which will translate your fig.yml into systemd files. Then you could deploy across a CoreOS cluster[2]. Pretty interesting.

[1] https://github.com/centurylinklabs/fig2coreos

[2] http://www.centurylinklabs.com/building-complex-apps-for-doc...

Re:Fig 1.0: Boot2docker compatibility and more by skrebbel on Friday October 17, 2014 @05:18PM (#8473434)
A lot? I Guess? Why not?

In fact, I'm amazed at the amount of businesses that don't. Half of what TechCrunch writes about is, in technical terms, Rails CRUD apps. Why would they need more than a single host in the first year?

Re:Fig 1.0: Boot2docker compatibility and more by Jare on Friday October 17, 2014 @07:02PM (#8473879)
Because hosts die.
Re:Fig 1.0: Boot2docker compatibility and more by Zariel on Friday October 17, 2014 @04:11PM (#8473078)
If your not then your missing out on utilising your resources, check out Mesos or Kubernetes for instance.
Re:Fig 1.0: Boot2docker compatibility and more by andrewstuart2 on Friday October 17, 2014 @03:18PM (#8472842)
> Beyond that, we’ve got new commands, .dockerignore support

Gosh dangit. It's about to the point I need a separate tool just to manage all my .ignore files.

Come to think of it, maybe just ln -s will do.

Re:Fig 1.0: Boot2docker compatibility and more by shykes on Saturday October 18, 2014 @12:10AM (#8474575)
Glad someone agrees with me :) For what it's worth, I resisted adding .dockerignore as long as I could, basically for the same reason (why not add .gitignore support instead?) but the demand for it was simply too overwhelming to ignore, so I gave up and let it in.

See https://github.com/docker/docker/pull/3452 and follow -up mailing list thread.

In the end it kind of grows on you :)

Re:Fig 1.0: Boot2docker compatibility and more by zenlikethat on Friday October 17, 2014 @05:04PM (#8473367)
Usually I just have a very tiny .dockerignore with .git in it (since .git usually grows so huge), although some applications store logs and stuff that you should probably not send to the docker daemon every time.

I've found Github's auto-generated-by-language .gitignore files very useful.

Re:Fig 1.0: Boot2docker compatibility and more by andrewstuart2 on Friday October 17, 2014 @06:17PM (#8473655)
I think it's just a tiny wrapper that oh-my-zsh has, but I have a `gi` bash function that calls out to gitignore.io/api/$@. Then I just redirect the response to .gitignore.

`gi vim,linux,node,grunt,bower > .gitignore`

Super handy.

Re:Fig 1.0: Boot2docker compatibility and more by zenlikethat on Friday October 17, 2014 @06:44PM (#8473802)
Nice!
Re:Fig 1.0: Boot2docker compatibility and more by nickstinemates on Friday October 17, 2014 @04:45PM (#8473260)
Agree, I think ignore files are leaky abstractions. The problem is specificity.
Re:Fig 1.0: Boot2docker compatibility and more by helfire on Friday October 17, 2014 @10:05PM (#8474388)
I was playing with Fig, SpringBoot, Node and postgres stack this afternoon. Playing with Docker since its release this is the first time is really all clicked together. Here's my notes - https://erichelgeson.github.io/blog/2014/10/17/docker-spring...
Re:Fig 1.0: Boot2docker compatibility and more by general_failure on Friday October 17, 2014 @03:24PM (#8472863)
What exactly is Fig?
Re:Fig 1.0: Boot2docker compatibility and more by Goopplesoft on Friday October 17, 2014 @03:29PM (#8472885)
It links docker containers for local dev environments. You can launch a project with say a webapp, a cache like redis, and a db like mysql with the comamnd 'fig up'. The 3 docker containers in this case are linked via a fig.yml that defines the setup. It also attaches your local development code so realtime changes propgate through the cotainer (e.g live server reloads)

Getting a new dev onboarded with your whole dockerized stack involves:

- pip install fig

- cd into directory with fig.yml

-'fig up'

Really a great tool. Definitely recommend it. Good intro here: http://www.fig.sh/

Re:Fig 1.0: Boot2docker compatibility and more by skrebbel on Friday October 17, 2014 @05:19PM (#8473444)
Not just for local dev environments. You can easily deploy on a host too, works the same.
Re:Fig 1.0: Boot2docker compatibility and more by general_failure on Friday October 17, 2014 @03:55PM (#8472990)
Ahh.. Almost heroku style but locally. Looks super useful to me!
Re:Fig 1.0: Boot2docker compatibility and more by rmgraham on Friday October 17, 2014 @03:57PM (#8473007)
I keep thinking of it as kinda like foreman/Procfile but for Docker containers instead of bare processes. And with a much richer config format.
Re:Fig 1.0: Boot2docker compatibility and more by calebm on Friday October 17, 2014 @04:52PM (#8473283)
This is awesome. I've been waiting on the docker 1.3 release and integration into Fig to begin using it.
Re:Fig 1.0: Boot2docker compatibility and more by deadweight3 on Friday October 17, 2014 @01:45PM (#8472265)
So is this essentially the same as Vagrant then? I'm really confused now.
Re:Fig 1.0: Boot2docker compatibility and more by mitchellh on Friday October 17, 2014 @02:56PM (#8472747)
I haven't seen how it has evolved, but historically it has been basically the same as our Docker provider: http://docs.vagrantup.com/v2/docker/index.html

The other comments at this level saying Vagrant spins up a full VM are incorrect. Vagrant will spin up boot2docker if it isn't running (which Fig requires as well), and then just execute Docker to run containers. On Linux, Vagrant doesn't spin up a VM at all; it just executes Docker directly.

I'm not here to talk about Fig vs. Vagrant, since I think this thread should be about congratulating Fig to 1.0, but I did want to make sure that some facts aren't incorrect.

Re:Fig 1.0: Boot2docker compatibility and more by deadweight3 on Friday October 17, 2014 @05:42PM (#8473524)
Right, I really phrased that poorly. I use vagrant on a windows machine in the office and various macs at home. Without the LXC, fig & docker don't really provide anything above what I'm using. Were I to move to linux, then this would have some advantages. Thanks for the clarification and a fantastic product.
Re:Fig 1.0: Boot2docker compatibility and more by zenlikethat on Friday October 17, 2014 @05:10PM (#8473398)
They are different tools for different use cases.

Fig is a tool written in Python specifically designed to orchestrate groups of docker containers. It does not require virtualization by default, it talks directly to the Docker API (so you can use it directly on Linux without boot2docker/VirtualBox). It is useful because previously people were writing their own custom little Bash scripts etc. to bootstrap containers for e.g. a PHP app to run app code, a MySQL database, a redis instance and an instance of nginx to serve static files which are all meant to be tied together and work together in a specific way. One of the goals of docker is "one concern per container" so this helps people to use it in the right way and you don't have to, say, restart your database to restart your app (like you would if you crammed them all into one container).

Vagrant is a general purpose tool for automation and management of virtual machines written in Ruby. You specify configuration in Ruby. One of its goals is choice, so it has swappable "drivers" (so that you can use different hypervisors such as VirtualBox, Fusion, and HyperV) and "provisioners" (for installing software etc. when you bootstrap a new VM). I'm afraid I have to plead ignorance on the Docker provisioner, but mitchellh is the creator so I'm sure his input is sound.

Re:Fig 1.0: Boot2docker compatibility and more by quantisan on Friday October 17, 2014 @02:19PM (#8472497)
the concept is the same as Vagrant. but it's substantially faster. when you `fig up` your app, it spins up almost instantaneously because it's backed by Docker.
Re:Fig 1.0: Boot2docker compatibility and more by gdw2 on Friday October 17, 2014 @02:20PM (#8472504)
Similar ends, but different means. Vagrant would launch a full-blown VM (likely on the order of several minutes), whereas fig'ing will start a container (on the order of a few seconds).
Re:Fig 1.0: Boot2docker compatibility and more by nailer on Friday October 17, 2014 @04:10PM (#8473076)
Fig still requires boot2docker, which uses VirtualBox.

See linked page at https://docs.docker.com/installation/mac/

Note VirtualBox is one of the only modules blacklisted by the Linux kernel not for being proprietary (it's Open Source) but because it's terrible.

http://www.phoronix.com/scan.php?page=news_item&px=OTk5Mw

Re:Fig 1.0: Boot2docker compatibility and more by zenlikethat on Friday October 17, 2014 @05:12PM (#8473408)
Fig only requires boot2docker if you are not working directly on Linux, this is true for docker itself as well.

We agree that VBox is not ideal but it is free and we would like to have other options (Fusion, HyperV) available in the future as well.

Re:Fig 1.0: Boot2docker compatibility and more by cpuguy83 on Sunday October 19, 2014 @07:38AM (#8477972)
boot2docker is a tiny Linux distro and does not require any specific virtualization tool, or even virtualization at all.

For the sake of simplicity and distribution the OSX and Windows installers package boot2docker with Virtualbox.

Re:Fig 1.0: Boot2docker compatibility and more by samuel1604 on Friday October 17, 2014 @11:39PM (#8474534)
I use fig with volume from my mac under vmware without any problem