Dockerfile 656 B

123456789101112131415161718192021
  1. FROM ubuntu:bionic-20200112 as builder
  2. LABEL maintainer="Stille <[email protected]>"
  3. ENV VERSION 2.0
  4. WORKDIR /
  5. COPY . /
  6. RUN apt-get update && \
  7. apt-get -y install wget && \
  8. /bin/bash -c '/bin/echo -e "1\n\nn\n" | ./status.sh' && \
  9. cp -rf /web /usr/local/ServerStatus/
  10. FROM nginx:1.17.8
  11. LABEL maintainer="Stille <[email protected]>"
  12. COPY --from=builder /usr/local/ServerStatus/server /ServerStatus/server/
  13. COPY --from=builder /usr/local/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'