Skip to content

Commit 9bb221a

Browse files
committed
Fix Dockerfile
1 parent e4f2c4a commit 9bb221a

2 files changed

Lines changed: 15 additions & 6 deletions

File tree

.dockerignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
.dockerignore
22
Dockerfile
33
node_modules
4-
puter
4+
/puter

Dockerfile

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
# /!\ NOTICE /!\
2+
3+
# Many of the developers DO NOT USE the Dockerfile or image.
4+
# While we do test new changes to Docker configuration, it's
5+
# possible that future changes to the repo might break it.
6+
# When changing this file, please try to make it as resiliant
7+
# to such changes as possible; developers shouldn't need to
8+
# worry about Docker unless the build/run process changes.
9+
110
# Build stage
211
FROM node:21-alpine AS build
312

@@ -11,13 +20,13 @@ WORKDIR /app
1120
# Copy package.json and package-lock.json
1221
COPY package*.json ./
1322

23+
# Copy the source files
24+
COPY . .
25+
1426
# Install node modules
1527
RUN npm cache clean --force \
1628
&& npm ci
1729

18-
# Copy the rest of the source files
19-
COPY . .
20-
2130
# Run the build command if necessary
2231
RUN npm run build
2332

@@ -39,7 +48,7 @@ WORKDIR /opt/puter/app
3948
# Copy built artifacts and necessary files from the build stage
4049
COPY --from=build /app/dist ./dist
4150
COPY --from=build /app/node_modules ./node_modules
42-
COPY package*.json ./
51+
COPY . .
4352

4453
# Set permissions
4554
RUN chown -R node:node /opt/puter/app
@@ -50,4 +59,4 @@ EXPOSE 4100
5059
HEALTHCHECK --interval=30s --timeout=3s \
5160
CMD wget --no-verbose --tries=1 --spider http://puter.localhost:4100/test || exit 1
5261

53-
CMD ["npm", "start"]
62+
CMD ["npm", "start"]

0 commit comments

Comments
 (0)