PGSQL=$(sudo docker run -p 5432:5432 -name pgsql -d project/pgsql /usr/bin/start_pgsql.sh YOURPASSWORD) PGSQL_IP=$(sudo docker inspect $PGSQL | grep IPAddress | awk '{ print $2 }' | tr -d ',"')
psql -h $PGSQL_IP -Uroot -d postgres
REDIS=$(sudo docker run -p 6379:6379 -d -name redis project/redis) REDIS_IP=$(sudo docker inspect $REDIS | grep IPAddress | awk '{ print $2 }' | tr -d ',"')
docker ps $PGSQL docker ps $REDIS
sudo docker run -i -p 80:80 -name rails -v /mnt/hgfs/project/rails/src:/var/www/project -link pgsql:pgsql -link redis:redis -t project/rails /bin/bash
sudo docker run -i -privileged -p 80:80 -name rails -v /vagrant/rails/src:/var/www/project -link pgsql:pgsql -link redis:redis -t project/rails /bin/bash