17 lines
358 B
Plaintext
17 lines
358 B
Plaintext
# 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"] |