Merge pull request #14028 from GoFightNguyen/docker_buildkit

Docker buildkit
This commit is contained in:
Fredrik Adelöw
2022-10-18 10:28:17 +01:00
committed by GitHub
2 changed files with 12 additions and 0 deletions
@@ -21,6 +21,10 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
# 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.