mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-22 12:21:13 +00:00
Using corepack to install pnpm, instead of npm -g
This commit is contained in:
parent
f8d5543508
commit
639b643678
1 changed files with 7 additions and 4 deletions
11
Dockerfile
11
Dockerfile
|
@ -1,4 +1,4 @@
|
||||||
FROM node:21-alpine as builder
|
FROM node:alpine as builder
|
||||||
|
|
||||||
# Added vips-dev and pkgconfig so that local vips is used instead of prebuilt
|
# Added vips-dev and pkgconfig so that local vips is used instead of prebuilt
|
||||||
# Done for two reasons:
|
# Done for two reasons:
|
||||||
|
@ -6,8 +6,11 @@ FROM node:21-alpine as builder
|
||||||
# - It can break depending on the CPU (https://github.com/LemmyNet/lemmy-ui/issues/1566)
|
# - It can break depending on the CPU (https://github.com/LemmyNet/lemmy-ui/issues/1566)
|
||||||
RUN apk update && apk upgrade && apk add --no-cache curl python3 build-base gcc wget git vips-dev pkgconfig
|
RUN apk update && apk upgrade && apk add --no-cache curl python3 build-base gcc wget git vips-dev pkgconfig
|
||||||
|
|
||||||
# Install node-gyp and pnpm
|
# Enable corepack to use pnpm
|
||||||
RUN npm install -g pnpm node-gyp
|
RUN corepack enable
|
||||||
|
|
||||||
|
# Install node-gyp
|
||||||
|
RUN npm install -g node-gyp
|
||||||
|
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
|
@ -40,7 +43,7 @@ RUN rm -rf ./node_modules/import-sort-parser-typescript
|
||||||
RUN rm -rf ./node_modules/typescript
|
RUN rm -rf ./node_modules/typescript
|
||||||
RUN rm -rf ./node_modules/npm
|
RUN rm -rf ./node_modules/npm
|
||||||
|
|
||||||
FROM node:21-alpine as runner
|
FROM node:alpine as runner
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
|
|
||||||
RUN apk update && apk add --no-cache curl vips-cpp && rm -rf /var/cache/apk/*
|
RUN apk update && apk add --no-cache curl vips-cpp && rm -rf /var/cache/apk/*
|
||||||
|
|
Loading…
Reference in a new issue