We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9b954b1 commit 011b025Copy full SHA for 011b025
Dockerfile
@@ -0,0 +1,23 @@
1
+# Use the official lightweight Node.js 14 image.
2
+# https://hub.docker.com/_/node
3
+FROM node:latest
4
+
5
+# Create and change to the app directory.
6
+WORKDIR /app
7
8
+# Copy application dependency manifests to the container image.
9
+# A wildcard is used to ensure copying both package.json AND package-lock.json (if available).
10
+# Copying this first prevents re-running npm install on every code change.
11
+COPY package*.json ./
12
13
+# Install production dependencies.
14
+RUN npm install --only=production
15
16
+# Copy local code to the container image.
17
+COPY . .
18
19
+# Expose the port the app runs in
20
+EXPOSE 3002
21
22
+# Run the web service on container startup.
23
+CMD [ "node", "app.js" ]
0 commit comments