-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsimple.Dockerfile
More file actions
30 lines (25 loc) · 892 Bytes
/
Copy pathsimple.Dockerfile
File metadata and controls
30 lines (25 loc) · 892 Bytes
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
# Docker is a tool designed to make it easier to create, deploy, and run applications by using containers.
# Containers allow a developer to package an application with all of the parts it needs, such as libraries and other dependencies, and ship it all out as one package
# Dockerfile is a definition of how to create a Docker image.
#
# -- Base node image with app
#
# dockerhub.com - offical image
FROM node:10-alpine
# available: npm, apt, ..
# Create app directory
WORKDIR /usr/src/app
# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
COPY package*.json ./
# If you are building your code for production
# RUN npm ci --only=production
RUN npm install --only=production
# Bundle app source
COPY . .
EXPOSE 3000
# used by express
ENV NODE_ENV=production
# command run on docker run
CMD [ "npm", "start" ]
# not multistage