FROM centos
MAINTAINER kalvin "dekun.dai@quantgroup.cn"

# 安装工具
RUN yum install -y make gcc* \
    && yum install -y git \
    && yum install -y vim \
    && yum install -y wget

# 安装node
RUN curl -sL https://rpm.nodesource.com/setup_8.x | bash -
RUN yum install -y nodejs

# 切换npm淘宝源
RUN npm config set registry https://registry.npm.taobao.org 

# 安装日志组件
RUN npm i frontail -g --registry=https://registry.npm.taobao.org

# 安装gulp
RUN npm install gulp

# 安装控制台组件
WORKDIR /home
RUN git clone http://192.168.3.60/QA/qg-xterm.git
WORKDIR /home/qg-xterm
RUN npm install
RUN npm run build

# 解决中文问题
ENV LANG en_US.UTF-8  
ENV LANGUAGE en_US:en  
ENV LC_ALL en_US.UTF-8 

# alias
RUN echo "export LANG='en_US.UTF-8';alias 'la=ls -al';alias rm='rm -i';alias mv='mv -i';alias grep='grep --color';alias vi='vim';alias pg='ps -ef | grep -i'" >> ~/.bashrc