This will build the local Dockerfile:
docker-compose build --no-cache
Get the rails app running on the background:
docker-compose up -d app
Enter rails console (within running container)
docker-compose exec -ti app bundle exec rails console
To run the test suite:
docker-compose exec -ti app bundle exec rake test # rails 4
docker-compose exec -ti app bundle exec rails test # rails 5
To inspect logs:
docker-compose logs -f
To restart just one container
docker-compose restart app
To stop (but not destroy) the cluster
docker-compose stop
To start (a stopped) cluster
docker-compose start
To destroy the cluster (usefull if config or state gets messed up)
docker-compose down
Check docker-compose config
docker-compose config
Debug in Docker(with pry) (As mentioned in below answers Ctrl+p, Ctrl+q will now turn interactive mode into daemon mode.)
docker attach app_name