Create Dockerfile
Browse files- Dockerfile +17 -0
Dockerfile
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
RUN --mount=type=secret,id=CLONE,mode=0444,required=true \
|
| 8 |
+
git clone $(cat /run/secrets/CLONE) .
|
| 9 |
+
|
| 10 |
+
RUN chown -R node:node ./* && \
|
| 11 |
+
chmod u+x ./* && \
|
| 12 |
+
chmod -R 777 /app
|
| 13 |
+
|
| 14 |
+
RUN npm install --no-audit --fund false
|
| 15 |
+
|
| 16 |
+
# Start the application
|
| 17 |
+
CMD ["node", "index.js"]
|