You can read a detailed description of the code in Driggl's blog.
Pre-requirements:
Put files from this gist in your brand new rails project, then run:
# build images
docker build -t Dockerfile sample/api:dev .
docker build -t Dockerfile.test sample/api:test .
# EITHER
# run the whole thing at once
docker-sync-stack start
# OR
# run it separately
# run the file synchronization
docker-sync start
# run the whole app stack
docker-compose up -d
- Development Docker Cheat Sheet
- Code explanation article
Author: Sebastian Wilgosz