From 3db1b8a2436ddf2278a07982bdc58060baa6cc02 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 8 Oct 2019 19:20:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=A4=E6=AE=B5=E7=BC=96=E8=AF=91=EF=BC=8C?= =?UTF-8?q?=E5=87=8F=E5=B0=8F=E9=95=9C=E5=83=8F=E4=BD=93=E7=A7=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- autodeploy/Dockerfile | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/autodeploy/Dockerfile b/autodeploy/Dockerfile index a4bafd4..edd9d80 100755 --- a/autodeploy/Dockerfile +++ b/autodeploy/Dockerfile @@ -1,18 +1,24 @@ -FROM nginx +FROM debian:latest as builder MAINTAINER cppla https://cpp.la RUN apt-get update RUN apt-get -y install gcc g++ make git RUN git clone https://github.com/cppla/ServerStatus -RUN cp -rf /ServerStatus/web/* /usr/share/nginx/html/ - WORKDIR /ServerStatus/server RUN make RUN pwd && ls -a +# glibc env run +FROM nginx:latest + +RUN mkdir -p /ServerStatus/server/ + +COPY --from=builder /ServerStatus/server /ServerStatus/server/ +COPY --from=builder /ServerStatus/web /usr/share/nginx/html/ + EXPOSE 80 35601 CMD nohup sh -c '/etc/init.d/nginx start && /ServerStatus/server/sergate --config=/ServerStatus/server/config.json --web-dir=/usr/share/nginx/html'