Dockerfile 866 B

123456789101112131415161718
  1. FROM centos:7
  2. WORKDIR /opt
  3. ENV LANG=en_US.utf8
  4. COPY deploy/docker/entrypoint.sh .
  5. COPY build/ /usr/share/nginx/html/
  6. COPY server/config.yaml /usr/share/nginx/html/config.yaml
  7. COPY web/.docker-compose/nginx/conf.d/nginx.conf /etc/nginx/conf.d/nginx.conf
  8. RUN set -ex \
  9. && echo "LANG=en_US.utf8" > /etc/locale.conf \
  10. && echo "net.core.somaxconn = 1024" >> /etc/sysctl.conf \
  11. && echo "vm.overcommit_memory = 1" >> /etc/sysctl.conf \
  12. && yum -y install epel-release \
  13. && yum -y localinstall http://mirrors.ustc.edu.cn/mysql-repo/mysql57-community-release-el7.rpm \
  14. && yum -y install mysql-community-server git redis nginx go npm --nogpgcheck && chmod +x ./entrypoint.sh \
  15. && npm install -g yarn && go env -w GO111MODULE=on && go env -w GOPROXY=https://goproxy.cn,direct \
  16. && echo "start" > /dev/null
  17. EXPOSE 80
  18. ENTRYPOINT ["./entrypoint.sh"]