I need to run multiple Ruby commands inside docker. What I normally do from SSH is:
docker exec -it containername bundle exec rails c
And then run my command. In this case:
SharedAccess.create(room_id: 56, user_id: 2)
The thing is I need to run multiple commands with different user_id's.
SharedAccess.create(room_id: 56, user_id: 3)
SharedAccess.create(room_id: 56, user_id: 4)
SharedAccess.create(room_id: 56, user_id: 5)
What I normally would do in shell is creating a script, pasting all the lines one below the other in there and then just run it. I want to find a way to create something like a script with all the lines in there and then run it from rake (inside docker).