Dockerfile 595 B

123456789101112131415161718192021222324
  1. FROM debian:latest as builder
  2. MAINTAINER cppla https://cpp.la
  3. RUN apt-get update
  4. RUN apt-get -y install gcc g++ make git
  5. RUN git clone https://github.com/cppla/ServerStatus
  6. WORKDIR /ServerStatus/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 /ServerStatus/server /ServerStatus/server/
  13. COPY --from=builder /ServerStatus/web /usr/share/nginx/html/
  14. EXPOSE 80 35601
  15. CMD nohup sh -c '/etc/init.d/nginx start && /ServerStatus/server/sergate --config=/ServerStatus/server/config.json --web-dir=/usr/share/nginx/html'