Created
May 12, 2020 10:39
-
-
Save dwdraju/434e14f24aee0005ba355a54f12437a0 to your computer and use it in GitHub Desktop.
Github package usage dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:12-alpine | |
ARG GITHUB_AUTH_TOKEN | |
ENV GITHUB_AUTH_TOKEN=$GITHUB_AUTH_TOKEN | |
RUN mkdir -p /home/node/app/node_modules && chown -R node:node /home/node/app | |
WORKDIR /home/node/app | |
COPY package.json ./ | |
RUN echo -e "@dwdraju:registry=https://npm.pkg.github.com\n//npm.pkg.github.com/:_authToken=$GITHUB_AUTH_TOKEN" > .npmrc | |
RUN npm install | |
COPY --chown=node:node . . | |
CMD npm start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment