mirror of
https://gitee.com/kennylee/docker.git
synced 2024-11-29 18:38:34 +08:00
修复node下cnpm无效的问题
This commit is contained in:
parent
09ac9938b7
commit
cd6a705c71
@ -39,9 +39,6 @@ RUN ln -fs /usr/share/zoneinfo/$TZ /etc/localtime && \
|
||||
WORKDIR $HOME
|
||||
|
||||
# add cnpm for taobao registry
|
||||
RUN alias cnpm="npm --registry=https://registry.npm.taobao.org \
|
||||
--cache=$HOME/.npm/.cache/cnpm \
|
||||
--disturl=https://npm.taobao.org/dist \
|
||||
--userconfig=$HOME/.cnpmrc"
|
||||
RUN echo '\n#alias for cnpm\nalias cnpm="npm --registry=https://registry.npm.taobao.org --cache=$HOME/.npm/.cache/cnpm --disturl=https://npm.taobao.org/dist --userconfig=$HOME/.cnpmrc"' >> ~/.bashrc
|
||||
|
||||
CMD [ "node" ]
|
||||
|
@ -12,9 +12,6 @@ RUN apk --no-cache update && \
|
||||
rm -fr /tmp/* /var/cache/apk/*
|
||||
|
||||
# add cnpm for taobao registry
|
||||
RUN alias cnpm="npm --registry=https://registry.npm.taobao.org \
|
||||
--cache=$HOME/.npm/.cache/cnpm \
|
||||
--disturl=https://npm.taobao.org/dist \
|
||||
--userconfig=$HOME/.cnpmrc"
|
||||
RUN echo '\n#alias for cnpm\nalias cnpm="npm --registry=https://registry.npm.taobao.org --cache=$HOME/.npm/.cache/cnpm --disturl=https://npm.taobao.org/dist --userconfig=$HOME/.cnpmrc"' >> ~/.bashrc
|
||||
|
||||
CMD [ "node" ]
|
||||
|
@ -3,7 +3,11 @@
|
||||
## 说明
|
||||
|
||||
1. 基于 [官方Node](https://hub.docker.com/_/node/) 镜像。
|
||||
2. 本地化修改,参见 https://dev.aliyun.com/detail.html?repoId=26157
|
||||
2. 本地化修改。
|
||||
|
||||
* 基础版,参见 https://dev.aliyun.com/detail.html?repoId=26157
|
||||
* alpine版本,参见 https://dev.aliyun.com/detail.html?repoId=26182
|
||||
|
||||
3. 内置cnpm命令,使用 `淘宝 NPM 镜像` 解决国内资源网络问题,可使用cnpm来安装模块。详细可参考 https://npm.taobao.org/
|
||||
|
||||
**注:基于alpine的镜像没中文支持。**
|
||||
|
Loading…
Reference in New Issue
Block a user