-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
41 lines (26 loc) · 801 Bytes
/
Dockerfile
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
38
39
40
41
#FROM node:alpine
FROM node:20.5.1
RUN mkdir -p /usr/src/node-app && chown -R node:node /usr/src/node-app
WORKDIR /usr/src/node-app
COPY package.json ./
#USER node
# Install necessary system dependencies (such as Python)
RUN apt-get update && \
apt-get install -y python3 && \
apt-get clean
# Install PM2 globally using npm
RUN npm install -g pm2
RUN ls -l /usr/local/bin
ENV PATH="/usr/local/bin:${PATH}"
# Install Yarn globally
#RUN npm install -g yarn
# Install dependencies using Yarn
RUN yarn install
#RUN npm install --legacy-peer-deps
#RUN yarn install --pure-lockfile
# Copy the rest of the application files to the working directory
COPY . .
# Replace the following with your actual app start command
CMD ["npm", "run", "startw"]
COPY --chown=node:node . .
EXPOSE 3000