chore: use corepack to install pnpm

This commit is contained in:
Matthieu MOREL 2024-08-24 08:10:52 +00:00
parent 4b195d17ed
commit 221aedc5f5
5 changed files with 20 additions and 8 deletions

View File

@ -12,6 +12,14 @@ permissions:
contents: write
jobs:
docker-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: hadolint/hadolint-action@54c9adbab1582c2ef04b2016b760714a4bfde3cf # v3.1.0
with:
verbose: true
lint:
runs-on: ubuntu-latest
steps:

2
.hadolint.yaml Normal file
View File

@ -0,0 +1,2 @@
ignored:
- DL3002 # TODO: Last USER should not be root

View File

@ -1,2 +1,10 @@
FROM node:20.12.2-alpine3.19 AS base
RUN wget -qO- https://get.pnpm.io/install.sh | ENV="$HOME/.shrc" SHELL="$(which sh)" sh -
FROM node:20.12.2-alpine3.19
USER 0:0
RUN corepack enable \
&& corepack enable pnpm
ENV NODE_OPTIONS="--max_old_space_size=8192"
EXPOSE 9000 3333

View File

@ -7,9 +7,6 @@ services:
tty: true
working_dir: /mermaid
mem_limit: '8G'
entrypoint: ./docker-entrypoint.sh
environment:
- NODE_OPTIONS=--max_old_space_size=8192
volumes:
- ./:/mermaid
- root_cache:/root/.cache

View File

@ -1,3 +0,0 @@
#!/bin/sh
source /root/.shrc
exec "$@"