Skip to content

Commit d2757f8

Browse files
committed
Fix dockerfile failures
1 parent f9f30bd commit d2757f8

File tree

1 file changed

+9
-14
lines changed

1 file changed

+9
-14
lines changed

Dockerfile

+9-14
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# Use Node 23 instead of 20
2-
FROM --platform=linux/amd64 node:23.1.0
2+
FROM node:23.1.0
3+
34

45
# Install node-gyp and node-waf
5-
RUN npm install -g node-gyp node-waf
6+
RUN npm install -g node-gyp node-waf pnpm
67

78
# Install system dependencies and Playwright dependencies in one layer
89
RUN apt-get update && apt-get install -y \
@@ -31,28 +32,22 @@ RUN apt-get update && apt-get install -y \
3132
&& rm -rf /var/lib/apt/lists/*
3233

3334
# Install pnpm
34-
RUN corepack enable pnpm
35+
#RUN corepack enable pnpm
3536

3637
# Set working directory
3738
WORKDIR /app
3839

3940
# Copy package files first
40-
COPY package.json pnpm-workspace.yaml pnpm-lock.yaml .npmrc ./
41-
COPY packages/core/package.json ./packages/core/
42-
COPY packages/agent/package.json ./packages/agent/
41+
COPY . .
4342

4443
# Install dependencies
45-
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --include=optional sharp --frozen-lockfile
44+
#RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile --include=optional sharp
45+
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install -w
46+
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --include=optional sharp -w
4647

4748
# Clean node_modules before copying source
4849
RUN rm -rf packages/*/node_modules
4950

50-
# Copy source files
51-
COPY . .
52-
53-
# Reinstall and build
54-
RUN pnpm install --include=optional sharp
55-
5651
# Build all packages
5752
RUN pnpm build
5853

@@ -65,4 +60,4 @@ ENV PORT=3000
6560
USER node
6661

6762
# Start the application
68-
RUN pnpm start
63+
CMD ["pnpm", "start"]

0 commit comments

Comments
 (0)