update Dockerfile

This commit is contained in:
cppla 2024-11-25 17:39:07 +08:00
parent f85c0a87f9
commit b0c543b44b

View File

@ -1,7 +1,7 @@
# The Dockerfile for build localhost source, not git repo
FROM debian:buster as builder
FROM debian:buster AS builder
MAINTAINER cppla https://cpp.la
LABEL maintainer="cppla <https://cpp.la>"
RUN apt-get update -y && apt-get -y install gcc g++ make libcurl4-openssl-dev
@ -26,4 +26,4 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
EXPOSE 80 35601
HEALTHCHECK --interval=5s --timeout=3s --retries=3 CMD curl --fail http://localhost:80 || bash -c 'kill -s 15 -1 && (sleep 10; kill -s 9 -1)'
CMD nohup sh -c '/etc/init.d/nginx start && /ServerStatus/server/sergate --config=/ServerStatus/server/config.json --web-dir=/usr/share/nginx/html'
CMD ["sh", "-c", "/etc/init.d/nginx start && /ServerStatus/server/sergate --config=/ServerStatus/server/config.json --web-dir=/usr/share/nginx/html"]