Fig: use docker to create a containers’ stack


0.00 avg. rating (0% score) - 0 votes


Fig is a fast, isolated development environments using Docker. For some features, it can be compared to Vagrant where the Dockerfike is not enough powerful to build multiple instances.

For example, let’s say you want to test a new product version of a software like MediaWiki and you want to build the complete stack. So you may need to have several tools categories (depending of the usage):

In Vagrant you can natively build 3 VM and interconnect them without the need of additional tool. However Docker can only do very basic things with it’s dockerfile and that’s when Fig enter into action.

You can build a YAML Fig configuration with all your requested tools and configuration. Then you can use it as vagrant with “fig up” command. Another nice feature is the possibility to scale easily by adding new containers with “scale” option. Fig really give some missing features to Dockerfile even if more would be appreciated :-).
If you want to know more about Fig and what is possible, then look at the nice official website.

Author: Deimos

I'm a passionate DevOps. I love transmit my skills and I love working on high availability infrastructures/technologies.


  1. Hello Deimos,

    Thanks for the post.

    However how a fig.yml can it be deployed on a docker cluster. I’m trying to do it on a mesosphere cluster but nothing works, I have 6 docker containers interconnected (django,redis,postgres,celery).

    I successfully build the project with “fig up” and having web access to my App.

    But I want to scale it on a mesosphere cluster. Is there any way to build personal docker images on Marathon and all dockers can communicate between each other just like when they was build with fig? or configure marathon to build project from fig.yml

    Any idea?


    • Hi Adil,

      Unfortunately, I didn’t play yet with Mesos or Mesosphere, so I’m not able to help you more on this, sorry :-/

      Are you happy in general with those technologies ?


  2. Currently I find mesos / marathon (kubernetes in future) is the only mature framework that helps in the creation and management of a cluster containers.

    With an ansible playbook, I was able to setup 6 VMs, 3 master(the minimum because of the zookeeper quorum) 3 slaves and 1 VM for marathon+HAproxy.

    The deployment of a docker container on Mesosphere is supported via marathon’s REST API.

    At this step I can tell that I’m happy regarding the simplicity of how to build the mesosphere cluster.

    Our objective is to use those technologies for a web application with dozens of deployments per day, all projects components are already running inside a separates single docker container, one container for each component, and deployment process is manager by fig.

    Currently Fig manage the entire process from staging to github repo and from github repo to production.

    The service should be highly available, and I’m looking for a way to set up a cluster of containers and an easy way the communicate db containers with app containers and Redis containers with app containers etc …

  3. Very interesting thanks

Laisser une réponse