From 681c7c854eeda0d67da6701f205aeb437298b13e Mon Sep 17 00:00:00 2001 From: Conicaw Date: Sat, 29 Jul 2023 15:53:20 -0500 Subject: [PATCH] fix: fix adding the node user User adduser instead of useradd since the former isn't installed in the base alpine image. Add both a node user and group with 1000 id following the same procedure as the official nodejs image. https://github.com/nodejs/docker-node/blob/main/Dockerfile-alpine.template#L5 --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 5481cea8a..23938c5c1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,7 +30,8 @@ RUN node install.js FROM base AS app -RUN useradd -ms /bin/bash node +RUN addgroup -g 1000 node \ + && adduser -u 1000 -G node -s /bin/sh -D node LABEL com.github.actions.name="Conventional Commit Lint" \ com.github.actions.description="commitlint your PRs with Conventional style" \