1# Copy and paste to pull this image for the latest
2docker pull node
3
4# more specific use this line
5# docker pull node:<version>-alpine
6docker pull node:14.4-alpine3.11
1FROM node:12
2
3# Create app directory
4WORKDIR /usr/src/app
5
6# Install app dependencies
7# A wildcard is used to ensure both package.json AND package-lock.json are copied
8# where available (npm@5+)
9COPY package*.json ./
10
11RUN npm install
12# If you are building your code for production
13# RUN npm ci --only=production
14
15# Bundle app source
16COPY . .
17
18EXPOSE 8080
19CMD [ "node", "server.js" ]
1FROM node:boron
2
3RUN mkdir -p /usr/src/app
4WORKDIR /usr/src/app
5
6COPY package.json /usr/src/app/
7RUN npm install
8
9COPY . /usr/src/app
10
11EXPOSE 3000
12
13CMD ["npm","start"]
14
15