From b301ef0b06a62cc673e03845ca58f9965055bd88 Mon Sep 17 00:00:00 2001 From: Tom Lagodzinski Date: Thu, 26 Sep 2024 12:01:53 +0200 Subject: [PATCH] RAIZ-7241: Add pnpm support. --- Dockerfile | 6 +++++- docker-bake.hcl | 11 ++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 59d1ead..a10d4ae 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ ARG ROCKY_VERSION -FROM rockylinux:${ROCKY_VERSION}-minimal +FROM rockylinux:${ROCKY_VERSION}-minimal AS base ARG NODE_VERSION @@ -40,3 +40,7 @@ RUN microdnf --nodocs -y upgrade && \ microdnf --nodocs install -y tzdata && \ microdnf clean all && \ rm -rf /var/cache/* + +FROM base AS pnpm + +RUN npm install -g pnpm \ No newline at end of file diff --git a/docker-bake.hcl b/docker-bake.hcl index 879f5eb..1c07bc2 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -9,18 +9,23 @@ group "default" { } target "nodejs" { - name = "nodejs-${node_version}" + name = "nodejs-${tgt}-${node_version}" matrix = { node_version = [ "18", "20", ] + tgt = [ + "base", + "pnpm" + ] } + target = tgt pull = true tags = [ - "acornsaustralia/node:${node_version}", - GITHUB_RUN_NUMBER != null ? "acornsaustralia/node:${node_version}-${GITHUB_RUN_NUMBER}" : "" + "acornsaustralia/node:${tgt}-${node_version}", + GITHUB_RUN_NUMBER != null ? "acornsaustralia/node:${node_version}-${tgt}-${GITHUB_RUN_NUMBER}" : "" ] platforms = [ "linux/amd64"