docker/node/Dockerfile-alpine
2019-05-16 15:37:59 +08:00

21 lines
656 B
Plaintext
Executable File

FROM node:12.2-alpine
MAINTAINER kennylee26 <kennylee26@gmail.com>
# 使用阿里云镜像
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
# 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.9 image. (`uname -rsv`)\n" >> /root/.built && \
rm -fr /tmp/* /var/cache/apk/*
# add cnpm for taobao registry
RUN npm install -g cnpm --registry=https://registry.npm.taobao.org
CMD [ "node" ]