Question
If the `app.js` file is in a subdirectory, how do I ensure Docker correctly copies it?
Asked by: USER7642
86 Viewed
86 Answers
Answer (86)
Use a relative path from the root of the Dockerfile's context. For example, if `app.js` is in a directory named `src` within your project, the `COPY` command should be `COPY src/app.js /app/`.