Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +20 -6
Dockerfile
CHANGED
|
@@ -1,10 +1,24 @@
|
|
| 1 |
-
|
|
|
|
| 2 |
|
|
|
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
-
|
| 6 |
-
RUN
|
| 7 |
-
RUN GOOS=linux GOARCH=amd64 go build -o getkeyinfo
|
| 8 |
-
RUN chmod +x /app/claudetoapi
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use the official Node.js image as the base image
|
| 2 |
+
FROM node:20.4
|
| 3 |
|
| 4 |
+
# Set the working directory in the container
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
# Git clone clewd
|
| 8 |
+
RUN git clone https://github.com/teralomaniac/clewd.git .
|
|
|
|
|
|
|
| 9 |
|
| 10 |
+
# Install the dependencies
|
| 11 |
+
RUN npm install --no-audit --fund false
|
| 12 |
+
|
| 13 |
+
# Change ownership of files in lib/bin and set permissions
|
| 14 |
+
RUN chown -R node:node lib/bin/* && \
|
| 15 |
+
chmod u+x lib/bin/* && \
|
| 16 |
+
chmod -R 777 /app
|
| 17 |
+
|
| 18 |
+
# Run as the "node" user for better security practices
|
| 19 |
+
USER node
|
| 20 |
+
|
| 21 |
+
RUN ls -la
|
| 22 |
+
|
| 23 |
+
# Start the application
|
| 24 |
+
CMD ["node", "clewd.js"]
|