We have build docker image locally and ran it and it works perfect.
If same was done through azure container registry, we are getting the file/module not found issue. So either files are not copied properly or the files path and importing path in code is different.
When we inspected both the images, the image size and especially copy . . command file changes size is different.
I have used vscode to build the docker image in azure container registry.
1st image reflects docker image built in local system, 2nd image reflects the docker image which is pulled from azure container registry
Any help to resolve this issue would be great.
Local system: Mac and node version 16
Azure container registry: Linux and node 16
Error: Cannot find module './src/routes/public'
Require stack:
- /app/app.js
- /app/server.js at Function.Module._resolveFilename (node:internal/modules/cjs/loader:985:15) at Function.Module._load (node:internal/modules/cjs/loader:833:27) at Module.require (node:internal/modules/cjs/loader:1057:19) at require (node:internal/modules/cjs/helpers:103:18) at Object.<anonymous> (/app/app.js:7:1) at Module._compile (node:internal/modules/cjs/loader:1155:14) at Module._compile (/app/node_modules/pirates/lib/index.js:99:24) at Module._extensions..js (node:internal/modules/cjs/loader:1209:10) at Object.newLoader [as .js] (/app/node_modules/pirates/lib/index.js:104:7) at Module.load (node:internal/modules/cjs/loader:1033:32) { code: 'MODULE_NOT_FOUND', requireStack: [ '/app/app.js', '/app/server.js' ]
}