Skip to content

Commit

Permalink
Merge pull request mermaid-js#5763 from mmorel-35/dockerfile
Browse files Browse the repository at this point in the history
chore: use corepack to install pnpm
  • Loading branch information
mmorel-35 authored Aug 24, 2024
2 parents 4b195d1 + ed352de commit 2f1cfe0
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 8 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions .hadolint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ignored:
- DL3002 # TODO: Last USER should not be root
12 changes: 10 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
3 changes: 0 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions docker-entrypoint.sh

This file was deleted.

0 comments on commit 2f1cfe0

Please sign in to comment.