0

I have built my application image using docker.I need to deploy it on multiple servers.I came across this tool called dockerfig.I followed this link.http://www.slideshare.net/Docker/dockercon-europe2014weitingkuo. After generating all files when i run fig up command. I get this error:

Unsupported config option for web1 service: 'docker_host'

My fig.yml is like this.

web1:
  build: .
  docker_host: tcp ://54.148.161.124:2376

  ports:
  - "8080:8080"

web1:
  build: .
  docker_host: tcp ://54.148.26.84:2376
  docker_cert_path: /home/ubuntu
  docker_tls_verify: 1

  ports:
  - "8080:8080".

Can anybody tell me where exactly i am going wrong?

Adrian Mouat
  • 44,585
  • 16
  • 110
  • 102
user2451997
  • 561
  • 3
  • 8
  • 16
  • It seems the error is on the line with docker_host, if I look at the doc for defining environment variable, http://www.fig.sh/env.html it should be a line like `DOCKER_HOST=tcp://54.148.161.124:2376` can you try ? – user2915097 Jan 27 '15 at 08:32

2 Answers2

2

Fig is a solution to manage a set of containers all running on a single machine. If you need an orchestration tool for multi-hosts, then you can look at Apache Mesos or Kubernetes.

Or, you can also write a custom script using fig to deploy your containers on all the hosts you want. But you'll have to do one fig call per host, use a different fig.yml per host and change the environment variable DOCKER_HOST between each call.

Brice Argenson
  • 802
  • 2
  • 8
  • 13
1

I don't believe the code to do this is actually in Fig. The slides you are looking at discuss a hack-day project to add this support, but it never made it into the official fig repository (hence the unsupported docker_host option).

You may find docker machine does what you want, but it is still in an early stage of development.

Adrian Mouat
  • 44,585
  • 16
  • 110
  • 102