一 准备Dockerfile文件
# Docker file for Hexo 3
FROM ubuntu:16.04
MAINTAINER cakin24
# use aliyun's mirror for faster download speed
RUN sed -i 's/archive.ubuntu.com/mirrors.aliyun.com/g' /etc/apt/sources.list
# add pandoc repository
RUN sed -i 's/deb mirror.lupaworld.com/ubuntu vivid main universe/g' /etc/apt/sources.list
# instal basic tool
RUN apt-get update && \
apt-get install -y nodejs curl git-core pandoc yui-compressor && \
update-alternatives --install /usr/bin/node node /usr/bin/nodejs 10 && \
curl -L https://npmjs.org/install.sh | sh && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
ENV HEXO_VERSION 3.0.0
# install hexo
RUN npm install -g hexo@${HEXO_VERSION}
# set base dir
RUN mkdir /hexo
# set home dir
WORKDIR /hexo
EXPOSE 4000
CMD ["/bin/bash"]# Docker file for He