Using node:10.16.3-alpine image for docker container.
Package version: v0.1.1
After using:
RUN npm-cli-login -u ${NPM_REGISTRY_USERNAME} -p ${NPM_REGISTRY_PASSWORD} -e ${NPM_REGISTRY_EMAIL} -r ${NPM_REGISTRY} -s ${NPM_REGISTRY_SCOPE} --config-path ${NPM_CONFIG_FILE}
Config file exists & login succeeds. However on npm install the authentication fails.
Here's the content of Dockerfile:
FROM node:10.16.3-alpine
# install dependencies
ARG NPM_REGISTRY_USERNAME
ARG NPM_REGISTRY_PASSWORD
ARG NPM_REGISTRY_EMAIL
ARG NPM_REGISTRY
ARG NPM_REGISTRY_SCOPE
ARG NPM_CONFIG_FILE=.npmrc
RUN mkdir /service
RUN mkdir /service/build
RUN npm install -g npm-cli-login
WORKDIR /service
RUN ls
RUN npm-cli-login -u ${NPM_REGISTRY_USERNAME} -p ${NPM_REGISTRY_PASSWORD} -e ${NPM_REGISTRY_EMAIL} -r ${NPM_REGISTRY} -s ${NPM_REGISTRY_SCOPE} --config-path ${NPM_CONFIG_FILE}
ADD package.json ./
RUN ls
RUN npm install
# copy app source to image _after_ npm install so that
# application code changes don't bust the docker cache of npm install step
ADD build /service/build
# CMD [ "npm", "run", "start" ]
Here all the args are valid & authentication succeed with status 201.
Using
node:10.16.3-alpineimage for docker container.Package version:
v0.1.1After using:
RUN npm-cli-login -u ${NPM_REGISTRY_USERNAME} -p ${NPM_REGISTRY_PASSWORD} -e ${NPM_REGISTRY_EMAIL} -r ${NPM_REGISTRY} -s ${NPM_REGISTRY_SCOPE} --config-path ${NPM_CONFIG_FILE}Config file exists & login succeeds. However on
npm installthe authentication fails.Here's the content of Dockerfile:
Here all the args are valid & authentication succeed with status
201.