Dockerfile 703 B

1234567891011121314151617181920212223242526272829
  1. # The Dockerfile for build localhost source, not git repo
  2. FROM debian:buster as builder
  3. MAINTAINER cppla https://cpp.la
  4. RUN apt-get update -y && apt-get -y install gcc g++ make libcurl4-openssl-dev
  5. COPY . .
  6. WORKDIR /server
  7. RUN make
  8. RUN pwd && ls -a
  9. # glibc env run
  10. FROM nginx:latest
  11. RUN mkdir -p /ServerStatus/server/
  12. COPY --from=builder server /ServerStatus/server/
  13. COPY --from=builder web /usr/share/nginx/html/
  14. # china time
  15. ENV TZ=Asia/Shanghai
  16. RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
  17. EXPOSE 80 35601
  18. CMD nohup sh -c '/etc/init.d/nginx start && /ServerStatus/server/sergate --config=/ServerStatus/server/config.json --web-dir=/usr/share/nginx/html'