Merge pull request #619 from bfirsh/add-script-which-runs-fig-inside-docker

Add script which runs Fig inside Docker
This commit is contained in:
Aanand Prasad 2015-02-23 18:20:33 +00:00
commit 1dd5ef4133
2 changed files with 22 additions and 0 deletions

View File

@ -1 +1,2 @@
.git
venv

21
script/dev Executable file
View File

@ -0,0 +1,21 @@
#!/bin/bash
# This is a script for running Compose inside a Docker container. It's handy for
# development.
#
# $ ln -s `pwd`/script/dev /usr/local/bin/docker-compose
# $ cd /a/compose/project
# $ docker-compose up
#
set -e
# Follow symbolic links
if [ -h "$0" ]; then
DIR=$(readlink "$0")
else
DIR=$0
fi
DIR="$(dirname "$DIR")"/..
docker build -t docker-compose $DIR
exec docker run -i -t -v /var/run/docker.sock:/var/run/docker.sock -v `pwd`:`pwd` -w `pwd` docker-compose $@