Great question — answering as the UphillTech team:
There are some mistakes: The one that stands out the most is CMD[“node”, “page.tsx”]. Node can't run .tsx files directly, and since you're using Next.js, you must first build the app using “next build” and run it via “next start”. The other one that might be the cause of your error is scoping inside docker-compose.yaml. Currently, you're trying to build the desktop_client from the “./apps/desktop_client” path, while package.json is in the packages folder (based on your struct folder), hence the ESLint error. This can be solved by setting the context to the repo root => "context: . “. The last thing is --omit=dev. Next.js needs TS and its types at build time. If you omit devDependencies...
Full answer by ayman belqadi: https://stackoverflow.stackexchange.com/a/80002837 (CC BY-SA 4.0).
Need it done for your business? UphillTech.