Files
cnpmjs.org/Dockerfile
lvs(zikuan.ly) e73b22d6d3 docs: Dockerized cnpmjs.org configuration with installation guide (#1191)
* add dockerizing file
* using mysql for dockerized cnpmjsorg
* add configure file for the dockrized instance
* update dockerized configuration for work properly on test env
* add dockerized cnpmjs.org install guide
* add named Docker volume
* update dockerized configuration, enable abbreviated meta data by default
2017-06-13 18:08:03 +08:00

29 lines
488 B
Docker

FROM node:6.11
MAINTAINER Bono Lv <lvscar {aT} gmail.com>
# Working enviroment
ENV \
CNPM_DIR="/var/app/cnpmjs.org" \
CNPM_DATA_DIR="/var/data/cnpm_data"
RUN mkdir -p ${CNPM_DIR}
WORKDIR ${CNPM_DIR}
COPY package.json ${CNPM_DIR}
RUN npm set registry https://registry.npm.taobao.org
RUN npm install
COPY . ${CNPM_DIR}
COPY docs/dockerize/config.js ${CNPM_DIR}/config/
EXPOSE 7001/tcp 7002/tcp
VOLUME ["/var/data/cnpm_data"]
# Entrypoint
CMD ["node", "dispatch.js"]