From 1587e5ba6cfaf5f6583ed0fe189b68bc8621026a Mon Sep 17 00:00:00 2001 From: Qin Guan Date: Sun, 16 Jul 2023 16:56:44 +0800 Subject: [PATCH] fix: ohhhh --- Dockerfile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 024b6b7..afed5a2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM docker.io/library/node:lts AS base +FROM docker.io/library/node:lts-alpine AS base # Prepare work directory WORKDIR /wsa-tollbooth @@ -8,13 +8,15 @@ FROM base AS builder # Prepare pnpm https://pnpm.io/installation#using-corepack RUN corepack enable +# Prepare deps +RUN apk update +RUN apk add git --no-cache + # Prepare build deps ( ignore postinstall scripts for now ) COPY .npmrc ./ COPY package.json ./ COPY pnpm-lock.yaml ./ -RUN pnpm i --frozen-lockfile --ignore-scripts - # Copy all source files COPY . ./ @@ -31,8 +33,8 @@ ARG GID=911 # Create a dedicated user and group RUN set -eux; \ - addgroup --gid $GID wsa-tollbooth; \ - adduser --uid $UID --defaults --groups wsa-tollbooth wsa-tollbooth; + addgroup -g $GID wsa-tollbooth; \ + adduser -u $UID -D -G wsa-tollbooth wsa-tollbooth; USER wsa-tollbooth