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"