Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # This is the "base image" which contains Alpine Linux and Node.js v10.x.x preinstalled
- FROM mhart/alpine-node:10
- # Use the `NPM_TOKEN` build arg to create the `~/.npmrc` file
- ARG NPM_TOKEN
- RUN echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
- # Set the working direcrory to `/usr/src`
- WORKDIR /usr/src
- # Copy the package.json and yarn.lock files into the iamge and run `yarn` to install dependencies
- COPY package.json yarn.lock /usr/src/
- RUN yarn
- # Copy the remaining source files into the image
- COPY . .
- # At this point the build is "done". CMD specifies the command that will be executed for runtime
- CMD ["node", "start.js"]
Add Comment
Please, Sign In to add comment