Posted by Arjun Arjun on Saturday 4th January 2020, 1 minute read

Docker file for Express App with PM2

FROM node:10
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install pm2 -g
RUN npm install
COPY . .
EXPOSE 8080
CMD ["pm2-runtime", "server.js"]
...
Arjun

I am Arjun from Hyderabad (India). I have been working as a software engineer from the last 7+ years, and it is my passion to learn new things and implement them as a practice. Aside from work, I like gardening and spending time with pets.