From 1aa9465611b9448c11ba3056296f6bbb752db1c1 Mon Sep 17 00:00:00 2001 From: Abijeet Date: Wed, 27 Jan 2021 00:20:48 +0530 Subject: [PATCH] Docker: Fix permission with node service by adding node as user See: https://github.com/nodejs/docker-node/blob/master/docs/BestPractices.md#non-root-user Fixes the following error: glob error: [Error: EACCES: permission denied, scandir '/root/.npm/_logs'] { errno: -13, code: 'EACCES', syscall: 'scandir', path: '/root/.npm/_logs' } --- docker-compose.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.yml b/docker-compose.yml index ea7a61ab5..39f5bdc18 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -39,6 +39,7 @@ services: node: image: node:alpine working_dir: /app + user: node volumes: - ./:/app entrypoint: /app/dev/docker/entrypoint.node.sh