-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (27 loc) · 747 Bytes
/
Copy pathDockerfile
File metadata and controls
37 lines (27 loc) · 747 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# FROM node:20-alpine
# COPY bin /app/
# COPY model /app/
# COPY public /app/
# COPY routes /app/
# COPY views /app/
# COPY .env /app/
# COPY app.js /app/
# COPY package-lock.json /app/
# COPY package.json /app/
# WORKDIR /app
# RUN npm install
# CMD ["node","./bin/www"]
# Use an official Node.js runtime as the base image
FROM node:14
# Set the working directory in the container
WORKDIR /app
# Copy package.json and package-lock.json to the working directory
COPY package*.json ./
# Install application dependencies
RUN npm install
# Copy the rest of the application code to the container
COPY . .
# Expose the port your Express.js application will run on
EXPOSE 5000
# Define the command to start your application
CMD ["npm", "dev"]