File size: 617 Bytes
0d3ffc3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1e99658
0d3ffc3
8665253
 
0d3ffc3
8d3a225
 
 
8665253
8d3a225
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
# Use an official Node.js runtime as a parent image
FROM node:14

# Set the working directory in the container
WORKDIR /node-ui

# Copy the package.json and package-lock.json to the working directory
COPY package*.json ./

# Install the dependencies
RUN npm install

# Copy the rest of the application code to the working directory
COPY . .

# Build the React application
RUN node create-env.js && npm run build

# Serve the built React application using a simple HTTP server
RUN npm install -g serve

# Expose port 3000 to the outside world
EXPOSE 7860

# Start the server
CMD ["serve", "-s", "build", "-l", "7860"]