diff --git a/docs/deployment/docker.md b/docs/deployment/docker.md index d35e7dd593..af8dbe08e8 100644 --- a/docs/deployment/docker.md +++ b/docs/deployment/docker.md @@ -68,6 +68,10 @@ RUN apt-get update && \ # From here on we use the least-privileged `node` user to run the backend. USER node + +# This should create the app dir as `node`. +# If it is instead created as `root` then the `tar` command below will fail: `can't create directory 'packages/': Permission denied`. +# If this occurs, then ensure BuildKit is enabled (`DOCKER_BUILDKIT=1`) so the app dir is correctly created as `node`. WORKDIR /app # This switches many Node.js dependencies to production mode. @@ -192,6 +196,10 @@ RUN apt-get update && \ # From here on we use the least-privileged `node` user to run the backend. USER node + +# This should create the app dir as `node`. +# If it is instead created as `root` then the `tar` command below will fail: `can't create directory 'packages/': Permission denied`. +# If this occurs, then ensure BuildKit is enabled (`DOCKER_BUILDKIT=1`) so the app dir is correctly created as `node`. WORKDIR /app # This switches many Node.js dependencies to production mode.