From 0928f1db92e62a0a9f28bc56e69b1917c25cf94a Mon Sep 17 00:00:00 2001 From: Vlad Frangu Date: Mon, 25 Aug 2025 16:08:49 +0300 Subject: [PATCH] docs: add in error for non-existing path when copying --- .../development/actor_definition/docker.md | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/sources/platform/actors/development/actor_definition/docker.md b/sources/platform/actors/development/actor_definition/docker.md index c3ccc6a776..880a6261ed 100644 --- a/sources/platform/actors/development/actor_definition/docker.md +++ b/sources/platform/actors/development/actor_definition/docker.md @@ -151,6 +151,32 @@ ENV UV_PROJECT_ENVIRONMENT="/usr/local" With the move to a non-root user, this variable will cause `uv` to throw a permission error. You can safely remove this line, or, if you need it set to a custom path, adjust it to point to a location in the `/home/myuser` directory. +#### `stat /usr/src/app/dist: file does not exist` + +With the change of the working directory to `/home/myuser`, you might see the following error: + +``` +Docker image build failed: COPY failed: stat /usr/src/app/dist: file does not exist +``` + +The fix is super simple! Find all your `COPY` instructions that copy files from the `/usr/src/app` directory and change them to copy from the `/home/myuser` directory instead. + +:::tip Example + +Previous: + +```dockerfile +COPY --from=builder /usr/src/app/dist ./dist +``` + +New: + +```dockerfile +COPY --from=builder /home/myuser/dist ./dist +``` + +::: + #### Copying files with the correct permissions When using the `COPY` instruction to copy your files to the container, you should append the `--chown=myuser:myuser` flag to the command to ensure the `myuser` user owns the files.