Update Dockerfile
Browse files- Dockerfile +7 -6
Dockerfile
CHANGED
|
@@ -4,15 +4,13 @@ FROM node:20.4
|
|
| 4 |
# Set the working directory in the container
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
-
#
|
| 8 |
-
|
|
|
|
| 9 |
|
| 10 |
# Install the dependencies
|
| 11 |
RUN npm install --no-audit --fund false
|
| 12 |
|
| 13 |
-
# Copy the rest of the files to the container
|
| 14 |
-
COPY . .
|
| 15 |
-
|
| 16 |
# Change ownership of files in lib/bin and set permissions
|
| 17 |
RUN chown -R node:node lib/bin/* && \
|
| 18 |
chmod u+x lib/bin/* && \
|
|
@@ -23,5 +21,8 @@ USER node
|
|
| 23 |
|
| 24 |
RUN ls -la
|
| 25 |
|
|
|
|
|
|
|
|
|
|
| 26 |
# Start the application
|
| 27 |
-
CMD ["node", "clewd.js"]
|
|
|
|
| 4 |
# Set the working directory in the container
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
# Git clone clewd
|
| 8 |
+
RUN git clone -b think https://github.com/jianglinzhang/clewd.git .
|
| 9 |
+
RUN sed -i -E '/res\.write\(`<!DOCTYPE html>.*<\/html>`\);/d' /app/clewd.js
|
| 10 |
|
| 11 |
# Install the dependencies
|
| 12 |
RUN npm install --no-audit --fund false
|
| 13 |
|
|
|
|
|
|
|
|
|
|
| 14 |
# Change ownership of files in lib/bin and set permissions
|
| 15 |
RUN chown -R node:node lib/bin/* && \
|
| 16 |
chmod u+x lib/bin/* && \
|
|
|
|
| 21 |
|
| 22 |
RUN ls -la
|
| 23 |
|
| 24 |
+
ENV PORT=7860
|
| 25 |
+
EXPOSE 7860
|
| 26 |
+
|
| 27 |
# Start the application
|
| 28 |
+
CMD ["node", "clewd.js"]
|