mirror of
https://gitee.com/kennylee/docker.git
synced 2024-12-02 03:48:15 +08:00
新增alpine版本的node环境
This commit is contained in:
parent
3cccb66fb0
commit
09ac9938b7
20
node/Dockerfile-alpine
Executable file
20
node/Dockerfile-alpine
Executable file
@ -0,0 +1,20 @@
|
|||||||
|
FROM node:alpine
|
||||||
|
|
||||||
|
MAINTAINER kennylee26 <kennylee26@gmail.com>
|
||||||
|
|
||||||
|
# Install base packages
|
||||||
|
RUN apk --no-cache update && \
|
||||||
|
apk --no-cache upgrade && \
|
||||||
|
apk --no-cache add curl bash tzdata tar unzip && \
|
||||||
|
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
|
||||||
|
echo "Asia/Shanghai" > /etc/timezone && \
|
||||||
|
echo -ne "Alpine Linux 3.4 image. (`uname -rsv`)\n" >> /root/.built && \
|
||||||
|
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"
|
||||||
|
|
||||||
|
CMD [ "node" ]
|
@ -2,7 +2,8 @@
|
|||||||
|
|
||||||
## 说明
|
## 说明
|
||||||
|
|
||||||
1、基于 [registry.cn-hangzhou.aliyuncs.com/kennylee/debian](https://dev.aliyun.com/detail.html?repoId=26157) 镜像。
|
1. 基于 [官方Node](https://hub.docker.com/_/node/) 镜像。
|
||||||
2、内置cnpm命令,使用 `淘宝 NPM 镜像` 解决国内资源网络问题,可使用cnpm来安装模块。详细可参考 https://npm.taobao.org/
|
2. 本地化修改,参见 https://dev.aliyun.com/detail.html?repoId=26157
|
||||||
|
3. 内置cnpm命令,使用 `淘宝 NPM 镜像` 解决国内资源网络问题,可使用cnpm来安装模块。详细可参考 https://npm.taobao.org/
|
||||||
|
|
||||||
**注:基于alpine的镜像没中文支持。**
|
**注:基于alpine的镜像没中文支持。**
|
||||||
|
Loading…
Reference in New Issue
Block a user