Update Dockerfile
Browse files- Dockerfile +9 -7
Dockerfile
CHANGED
|
@@ -1,21 +1,23 @@
|
|
| 1 |
FROM node:lts-alpine
|
| 2 |
|
|
|
|
| 3 |
RUN apk add --no-cache git bash
|
| 4 |
|
|
|
|
| 5 |
WORKDIR /app
|
| 6 |
|
|
|
|
| 7 |
RUN git clone --depth=1 --branch stable https://github.com/stackblitz-labs/bolt.diy.git .
|
| 8 |
|
| 9 |
-
#
|
| 10 |
RUN chown -R node:node /app
|
| 11 |
|
| 12 |
-
#
|
| 13 |
USER node
|
| 14 |
|
| 15 |
-
# Use
|
| 16 |
-
RUN
|
| 17 |
-
|
| 18 |
-
RUN pnpm install
|
| 19 |
|
| 20 |
EXPOSE 7860
|
| 21 |
-
|
|
|
|
|
|
| 1 |
FROM node:lts-alpine
|
| 2 |
|
| 3 |
+
# Install git and bash
|
| 4 |
RUN apk add --no-cache git bash
|
| 5 |
|
| 6 |
+
# Set working directory
|
| 7 |
WORKDIR /app
|
| 8 |
|
| 9 |
+
# Clone the repo
|
| 10 |
RUN git clone --depth=1 --branch stable https://github.com/stackblitz-labs/bolt.diy.git .
|
| 11 |
|
| 12 |
+
# Change ownership of /app to the default non-root user "node"
|
| 13 |
RUN chown -R node:node /app
|
| 14 |
|
| 15 |
+
# Switch to the non-root user
|
| 16 |
USER node
|
| 17 |
|
| 18 |
+
# Use npx to install dependencies and run dev server
|
| 19 |
+
RUN npx --yes pnpm install
|
|
|
|
|
|
|
| 20 |
|
| 21 |
EXPOSE 7860
|
| 22 |
+
|
| 23 |
+
CMD ["npx", "--yes", "pnpm", "run", "dev", "-p", "7860"]
|