Dockerfile
985 Bytes
############################################################
# Dockerfile to build hystrix + turbin Installed Containers
# Based on centos 6.7
# How to build new image: docker build -t yoho-hystrix-qcloud .
# the hystrix alert need to post events to influxdb.yohoops.org.
# nginx version: 1.12.0
############################################################
#base image : ccr.ccs.tencentyun.com/yoho-base/nodejs:pm2-8.9.1
FROM ccr.ccs.tencentyun.com/yoho-base/nodejs:pm2-8.9.1
MAINTAINER xiaoxiao.hao <xiaoxiao.hao@yoho.cn>
ENV NODE_ENV=production \
NODE_HOME=/home
# COPY turbine configuration files
COPY yoho-seo.tar.gz /home
RUN cd /home && \
mkdir -p /home/yoho-seo && \
tar -xzvf yoho-seo.tar.gz -C /home/yoho-seo && \
rm -rf yoho-seo.tar.gz
RUN cd /home/yoho-seo && \
rm -rf node_modules && \
npm i -d --registry http://npm.yohops.com
WORKDIR /home/yoho-seo
#expose port
EXPOSE 6005
CMD ["pm2-docker","start","/home/yoho-seo/process.json"]