I have a rails project and I’m testing it with rspec. Usually, I use spring that autoload files and I a launch a test, for exemple, like this :
I can run it docker by doing this :
docker-compose run web bin/rspec spec/requests/messages_spec.rb
Or I can use bash like this :
docker-compose run web bash bin/rspec spec/requests/messages_spec.rb
I think there is pro and cons for both, here is what I can see :
Run everytime :
- I still in my host shell. I can use my zsh and .zshrc
- I think it’s the docker way
It’s longer to write even if did an alis (
It’s longer to run. Spring is not useful in this case.
- I have to copy my dotenv files if I want to use them and reinstall my favourite tools.
What do you do? How do you use docker in development?