From 93eb682172c92a985afdde2c4a4a0ba8015b60bf Mon Sep 17 00:00:00 2001 From: Martin Haberfellner Date: Thu, 12 Sep 2024 00:25:53 +0200 Subject: [PATCH] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20Update=20Dockerfile=20to?= =?UTF-8?q?=20use=20new=20Node=20+=20git=20versions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3c88070..7512e83 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,12 @@ -FROM node:12.14.1-alpine3.11 -ENV NODE_ENV=production +# syntax=docker/dockerfile:1 +# FROM node:lts-slim (Version: 20.17.0) +FROM node@sha256:9fb20391a0320aed25636d8312f4332f9be734c5acef4c94722048c2bed5a87d AS gitmoji-changelog-base # install dependencies -RUN apk add --no-cache git=2.24.1-r0 +RUN apt-get update && apt-get install -y git \ +&& apt-get clean \ +&& rm -rf /var/lib/apt/lists/* \ +&& git config --global --add safe.directory /app # build gitmoji-changelog from source WORKDIR /usr/src/gitmoji-changelog @@ -10,7 +14,7 @@ COPY . . RUN yarn --frozen-lockfile && yarn cache clean # run gitmoji-changelog on container startup -RUN ln -s /usr/src/gitmoji-changelog/node_modules/.bin/gitmoji-changelog /usr/bin +WORKDIR /usr/src/gitmoji-changelog/packages/gitmoji-changelog-cli +RUN npm link WORKDIR /app ENTRYPOINT ["gitmoji-changelog"] -USER node