ServerStatus/Dockerfile

22 lines
656 B
Docker
Raw Normal View History

2021-06-06 22:07:22 +08:00
FROM ubuntu:bionic-20200112 as builder
2022-07-22 00:28:48 +08:00
LABEL maintainer="Stille <stille@ioiox.com>"
2020-02-10 23:08:05 +08:00
2021-06-06 22:07:22 +08:00
ENV VERSION 2.0
2020-02-10 23:08:05 +08:00
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/
2021-06-06 22:07:22 +08:00
FROM nginx:1.17.8
2022-07-22 00:28:48 +08:00
LABEL maintainer="Stille <stille@ioiox.com>"
2020-02-10 23:08:05 +08:00
COPY --from=builder /usr/local/ServerStatus/server /ServerStatus/server/
COPY --from=builder /usr/local/ServerStatus/web /usr/share/nginx/html/
EXPOSE 80 35601
2021-06-06 22:07:22 +08:00
CMD nohup sh -c '/etc/init.d/nginx start && /ServerStatus/server/sergate --config=/ServerStatus/server/config.json --web-dir=/usr/share/nginx/html'