Guest User

Untitled

a guest
Jul 17th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. # This is the "base image" which contains Alpine Linux and Node.js v10.x.x preinstalled
  2. FROM mhart/alpine-node:10
  3.  
  4. # Use the `NPM_TOKEN` build arg to create the `~/.npmrc` file
  5. ARG NPM_TOKEN
  6. RUN echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
  7.  
  8. # Set the working direcrory to `/usr/src`
  9. WORKDIR /usr/src
  10.  
  11. # Copy the package.json and yarn.lock files into the iamge and run `yarn` to install dependencies
  12. COPY package.json yarn.lock /usr/src/
  13. RUN yarn
  14.  
  15. # Copy the remaining source files into the image
  16. COPY . .
  17.  
  18. # At this point the build is "done". CMD specifies the command that will be executed for runtime
  19. CMD ["node", "start.js"]
Add Comment
Please, Sign In to add comment