【发布时间】:2020-01-13 10:37:33
【问题描述】:
我有一个安装 nodejs 的 dockerfile。我从该 dockerfile 创建一个容器以用作 jenkins 中的从属。问题是当我尝试发布(npm publish --registry ...)时,它说我需要先登录。但是我不能在 jenkins 文件中使用 npm adduser ,因为您必须在需要时手动输入用户名和密码。我尝试使用有效令牌添加文件 .nmrw,但没有成功。任何想法? 最好的问候。
FROM jenkins/ssh-slave
# Install selected extensions and other stuff
RUN apt-get update && apt-get -y --no-install-recommends install && apt-get clean
RUN apt-get install -y curl
# Install nodejs
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
RUN apt-get install -y nodejs && apt-get install -y nginx
【问题讨论】:
-
完成了。我做到了:)
标签: node.js jenkins-pipeline dockerfile