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

# #替换源
WORKDIR /etc/apt/
RUN mv sources.list /tmp

RUN echo deb http://mirrors.163.com/debian/  stretch main non-free contrib >> sources.list \
    && echo deb http://mirrors.163.com/debian/  stretch-updates main non-free contrib >> sources.list \
    && echo deb-src http://mirrors.163.com/debian/  stretch main non-free contrib >> sources.list \
    && echo deb-src http://mirrors.163.com/debian/  stretch-updates main non-free contrib >> sources.list \
    && echo deb http://mirrors.163.com/debian-security/  stretch/updates main non-free contrib >> sources.list \
    && echo deb-src http://mirrors.163.com/debian-security/  stretch/updates main non-free contrib >> sources.list

RUN apt-get update \
  && apt-get install --assume-yes --no-install-recommends\
    apt-transport-https \
		iputils-ping \
    build-essential \
    bzip2 \
    curl \
    git \
    rlwrap \
    vim \
  && curl -sL https://deb.nodesource.com/setup_6.x | bash - \
  && apt-get install --assume-yes --no-install-recommends nodejs \
  && apt-get clean

EXPOSE 80
EXPOSE 443

VOLUME /etc/nginx/conf.d/
COPY nginx.conf /etc/nginx/nginx.conf

CMD nginx -g 'daemon off;'