From a667955ec0139065a620c1ff835ee29bebfbabb5 Mon Sep 17 00:00:00 2001 From: Stille Date: Mon, 10 Feb 2020 23:08:05 +0800 Subject: [PATCH] Create Dockerfile --- Dockerfile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3f054f5 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +FROM ubuntu:latest as builder +MAINTAINER Stille + +WORKDIR / + +COPY . / +RUN apt-get update && \ + apt-get -y install wget && \ + /bin/bash -c '/bin/echo -e "1\n\nn\n" | ./status.sh' && \ + cp -rf /web /usr/local/ServerStatus/ + +FROM nginx:latest +MAINTAINER Stille + +COPY --from=builder /usr/local/ServerStatus/server /ServerStatus/server/ +COPY --from=builder /usr/local/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' \ No newline at end of file