chore: add Dockerfile for Node.js application setup
This commit is contained in:
17
dockerfile
Normal file
17
dockerfile
Normal file
@@ -0,0 +1,17 @@
|
||||
# Dockerfile for a simple Node.js app with index.js
|
||||
|
||||
FROM node:18-alpine
|
||||
|
||||
# set working directory
|
||||
WORKDIR /app
|
||||
|
||||
# copy package files and install dependencies (if any)
|
||||
# if you don't have package.json you can omit these lines
|
||||
COPY package*.json ./
|
||||
RUN npm install
|
||||
|
||||
# copy the rest of the app
|
||||
COPY . .
|
||||
|
||||
# default command to run the app
|
||||
CMD ["node", "index.js"]
|
||||
Reference in New Issue
Block a user