Use fig and docker-machine to deploy remotely

I use docker-machine to easily create docker hosts on AWS.

Locally I use fig (or docker-compose) to start the various microservices associated with a service.

  • How do I read a docker environment variable within a js script?
  • How to create a docker container with more than 50G storage
  • How to deploy multi-tier application using Docker?
  • Ansible docker_container etc_hosts with variable key
  • Docker CE on Mac OSX hanging on startup
  • How to add Dockerfile to a docker registry page?
  • Is it possible for fig to use the config variables set by the docker-machine command:

     docker-machine config host

    So when I do:

    fig up

    Fig creates the service on the host set by docker-machine and not the local one?

  • GC collection of Docker Registry
  • Docker image is not visible when I run docker ps
  • Config separate container to different host on Rancher platform
  • Access apache inside ubuntu container
  • Why can't I extend docker postgres image to create extra database and user
  • Jetty Docker container running spring application unable to connect to mysql running outside docker container
  • One Solution collect form web for “Use fig and docker-machine to deploy remotely”

    I haven’t tried to do this with a remote host but I have it working with a vmwarefusion based machine. Because fig respects some of the DOCKER_ environment variables you can modify them to point to your docker host. Try something like this:

    $(docker-machine env host); docker-compose up

    Edited previous approach (referenced in comments):

    # modify path and host with output from > docker-machine config host
    fig up
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.