Skip to content

Commit c5a8b40

Browse files
fix: correct Dockerfile WORKDIR and missing COPY stages
WORKDIR was set to / causing npm to look for //package.json. Final image stage also had no COPY instructions, leaving it empty. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 6bd68bf commit c5a8b40

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

Dockerfile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ FROM node:${NODE_VERSION}-slim AS base
77
LABEL fly_launch_runtime="Node.js"
88

99
# Node.js app lives here
10-
WORKDIR /
10+
WORKDIR /app
1111

1212
# Set production environment
1313
ENV NODE_ENV="production"
@@ -22,10 +22,16 @@ RUN apt-get update -qq && \
2222

2323
# Install node modules
2424
COPY package-lock.json package.json ./
25-
RUN npm ci
25+
RUN npm ci --omit=dev
2626

2727
# Final stage for app image
2828
FROM base
2929

30+
# Copy dependencies from build stage
31+
COPY --from=build /app/node_modules ./node_modules
32+
33+
# Copy application source
34+
COPY . .
35+
3036
EXPOSE 4005
3137
CMD [ "npm", "run", "demo:deployed"]

0 commit comments

Comments
 (0)