File size: 557 Bytes
de28d21
0188a6a
45b9bf0
de28d21
 
 
0188a6a
 
45b9bf0
f830391
04a901a
0188a6a
45b9bf0
0188a6a
f2e4670
447b213
f830391
d9c9946
 
0188a6a
 
 
 
 
 
 
 
 
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
# Use a specific version of the node image as a base
FROM node:16-alpine

# Install OpenJDK (Java)
RUN apk add --no-cache openjdk11

# Set working directory
WORKDIR /code

# Copy package.json and package-lock.json and install dependencies
COPY package*.json ./
RUN npm install --production

# Copy the rest of the application files
COPY . .

# Create a directory for temporary Java files
RUN mkdir -p /code/temp && \
    chmod 777 /code/temp

# Expose port
EXPOSE 7860

# Set user to non-root
USER node

# Start Node.js application
CMD ["node", "index.js"]