1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| FROM node as builder
WORKDIR /app COPY package.json . RUN npm install
FROM node
ENV HEXO_SsERVER_PORT=4000
RUN npm cache clear --force && \ npm install -g hexo-cli
WORKDIR /app COPY --from=builder /app/ /app/ COPY . .
EXPOSE ${HEXO_SERVER_PORT}
CMD hexo server -p ${HEXO_SERVER_PORT}
|