File tree 1 file changed +4
-6
lines changed
1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -2,18 +2,18 @@ FROM node:21.7.3-alpine as base
2
2
3
3
WORKDIR /app
4
4
5
- RUN corepack enable
6
5
RUN apk add --no-cache python3 make g++
7
6
8
- COPY pnpm-lock.yaml ./
7
+ COPY package.json pnpm-lock.yaml ./
8
+ RUN corepack enable
9
9
10
10
RUN pnpm fetch
11
11
12
12
FROM base as build
13
13
14
14
WORKDIR /app
15
15
16
- COPY tsup.config.ts package.json ./
16
+ COPY tsup.config.ts ./
17
17
COPY src ./src
18
18
19
19
RUN pnpm install --frozen-lockfile --offline && \
@@ -23,7 +23,6 @@ FROM base as production-dependencies
23
23
24
24
WORKDIR /app
25
25
26
- COPY package.json ./
27
26
RUN pnpm prune --prod && \
28
27
pnpm install --production --frozen-lockfile --offline && \
29
28
pnpm store prune
@@ -34,8 +33,7 @@ WORKDIR /app
34
33
35
34
COPY --from=production-dependencies --chown=node /app/node_modules ./node_modules
36
35
COPY --from=build --chown=node /app/dist ./
37
-
38
- RUN echo '{"type":"module"}' > package.json
36
+ COPY --from=base --chown=node /app/package.json ./
39
37
40
38
USER node
41
39
You can’t perform that action at this time.
0 commit comments