Our application is built using TypeScript and the source code resides in the /src
directory. We have tests located in the /tests
directory. When we compile the code locally using TSC, the compiled files are deposited into /dist/src
and /dist/test
respectively.
In our Docker configuration, we have specified to exclude certain development files, including /tests
. As a result, when Docker runs TSC, it only compiles the files in /src
, causing all of them to be deposited into /dist
. This means that folders like /services get compiled to /dist/src/services/whatever.js
locally, but appear as /dist/services/whatever.js
in our container.
Our Dockerfiles are simple and mainly focus on running TSC and setting entry points. Should we consider making our Dockerfiles more explicit? Has anyone encountered this issue before and found elegant solutions?