Reuse code by running formula with Docker

I have not found how to use code outside the formula folders, for example, several formulas will connect to a database, so as not to replicate the same connection code, it can be centralized outside the formulas and reused, when this is done by running the formula locally, it’s possible to do it but when you need to do it with Docker, I haven’t found how to do it.

I created a repository on GitHub to illustrate the problem, due to forum guidelines, I won’t paste the link, to get to this repository:

  • Username: afonsofilhozup
  • Repository: ritchie-formulas-docker-issues

To reproduce the problem:

  1. Add the repository in Ritchie
  2. Run the formula: rit docker-issues reuse content --docker

This formula tries to read a text file that is outside the formula folder and show it in the terminal, it works locally, in the Docker it doesn’t.