Use corepack for pnpm management

This commit is contained in:
Andreas Dueren
2025-07-14 21:03:20 -06:00
parent 4c7f6b913e
commit dc19eb159f

View File

@@ -2,10 +2,10 @@ FROM cloudron/base:5.0.0
MAINTAINER Cloudron Support <support@cloudron.io> MAINTAINER Cloudron Support <support@cloudron.io>
# Install Node.js 20 and pnpm # Install Node.js 20 and enable corepack for pnpm
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \ RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
apt-get install -y nodejs && \ apt-get install -y nodejs && \
npm install -g pnpm@9.12.4 corepack enable
# Set up application directory # Set up application directory
WORKDIR /app/code WORKDIR /app/code
@@ -13,9 +13,7 @@ WORKDIR /app/code
# Clone and build Docmost # Clone and build Docmost
RUN git clone https://github.com/docmost/docmost.git . && \ RUN git clone https://github.com/docmost/docmost.git . && \
rm -rf .git && \ rm -rf .git && \
corepack enable && \ pnpm install && \
corepack prepare pnpm@latest --activate && \
pnpm install --frozen-lockfile && \
pnpm build pnpm build
# Create necessary directories # Create necessary directories