1 # Check out https://hub.docker.com/_/node to select a new base image
4 # Set to a non-root built-in user `node`
7 # Create app directory (with user `node`)
8 RUN mkdir -p /home/node/app
10 WORKDIR /home/node/app
12 # Install app dependencies
13 # A wildcard is used to ensure both package.json AND package-lock.json are copied
14 # where available (npm@5+)
15 COPY --chown=node package*.json ./
19 # Bundle app source code
24 # Bind to all network interfaces so that it can be mapped to the host OS
25 ENV HOST=0.0.0.0 PORT=3000