Dockerfile 566 B

12345678910111213141516171819202122232425
  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
  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. 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'