项目中引入了其他 leancloud-storage 、valine ,需要结合构建,且构建时需要限定版本
.vuepress/dist 目录docker run -v $PWD:/work/src --rm hanlyjiang/vuepress:alpine
docker run -v $PWD:/work/src -v $PWD/../output:/work/html --rm hanlyjiang/vuepress:alpine vuepress build -d /work/html/moa-doc
FROM node:alpine
ENV REGISTRY=https://registry.npm.taobao.org
# 安装必要依赖
RUN npm install -g [email protected] --registry=$REGISTRY && \
npm install -g leancloud-storage --registry=$REGISTRY && \
npm install -g valine --registry=$REGISTRY
# npm install 容易出错,所以我们分两条命令
RUN mkdir -p /work/src /work/html
VOLUME [ "/work/src", "/work/html"]
# 可以改变运行容器时的目录
WORKDIR /work/src
# ENTRYPOINT ["vuepress"]
CMD ["vuepress", "build"]
Content type
Image
Digest
Size
130.7 MB
Last updated
almost 7 years ago
docker pull hanlyjiang/vuepress