diff --git a/Dockerfile b/Dockerfile index 4e5ffb2..7e3b63b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,15 +7,17 @@ RUN cd cmd/dashboard && go build -o app -ldflags="-s -w" FROM alpine:latest ENV TZ="Asia/Shanghai" +COPY ./script/entrypoint.sh /entrypoint.sh RUN apk --no-cache --no-progress add \ ca-certificates \ tzdata && \ cp "/usr/share/zoneinfo/$TZ" /etc/localtime && \ - echo "$TZ" > /etc/timezone + echo "$TZ" > /etc/timezone && \ + chmod +x /entrypoint.sh WORKDIR /dashboard COPY ./resource ./resource COPY --from=binarybuilder /dashboard/cmd/dashboard/app ./app VOLUME ["/dashboard/data"] EXPOSE 80 5555 -CMD ["/dashboard/app"] +ENTRYPOINT ["/entrypoint.sh"] \ No newline at end of file diff --git a/README.md b/README.md index 77893c7..4eaa3d5 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@
LOGO designed by 熊大 .

-    +   

:trollface: Nezha Monitoring self-hosted lightweight monitoring and operation and maintenance system. Supports system status, HTTP (SSL certificate change, upcoming expiration, expiration), TCP, Ping monitoring and alerting, execute scheduled tasks and web terminal.

diff --git a/script/entrypoint.sh b/script/entrypoint.sh new file mode 100644 index 0000000..dc39b74 --- /dev/null +++ b/script/entrypoint.sh @@ -0,0 +1,3 @@ +#!/bin/sh +echo -e "nameserver 127.0.0.11\nnameserver 8.8.8.8\nnameserver 223.5.5.5\n" > /etc/resolv.conf +/dashboard/app \ No newline at end of file diff --git a/script/install.sh b/script/install.sh index 303396e..d3d4637 100755 --- a/script/install.sh +++ b/script/install.sh @@ -130,10 +130,10 @@ install_base() { install_soft() { # Arch官方库不包含selinux等组件 - (command -v yum >/dev/null 2>&1 && yum install $* selinux-policy -y) || - (command -v apt >/dev/null 2>&1 && apt install $* selinux-utils -y) || + (command -v yum >/dev/null 2>&1 && yum makecache && yum install $* selinux-policy -y) || + (command -v apt >/dev/null 2>&1 && apt update && apt install $* selinux-utils -y) || (command -v pacman >/dev/null 2>&1 && pacman -Syu $*) || - (command -v apt-get >/dev/null 2>&1 && apt-get install $* selinux-utils -y) + (command -v apt-get >/dev/null 2>&1 && apt-get update && apt-get install $* selinux-utils -y) } install_dashboard() { diff --git a/script/install_en.sh b/script/install_en.sh index 0d41645..5b1d9b9 100755 --- a/script/install_en.sh +++ b/script/install_en.sh @@ -100,10 +100,10 @@ install_base() { install_soft() { # The official Arch library does not contain selinux components - (command -v yum >/dev/null 2>&1 && yum install $* selinux-policy -y) || - (command -v apt >/dev/null 2>&1 && apt install $* selinux-utils -y) || + (command -v yum >/dev/null 2>&1 && yum makecache && yum install $* selinux-policy -y) || + (command -v apt >/dev/null 2>&1 && apt update && apt install $* selinux-utils -y) || (command -v pacman >/dev/null 2>&1 && pacman -Syu $*) || - (command -v apt-get >/dev/null 2>&1 && apt-get install $* selinux-utils -y) + (command -v apt-get >/dev/null 2>&1 && apt-get update && apt-get install $* selinux-utils -y) } install_dashboard() { diff --git a/service/singleton/singleton.go b/service/singleton/singleton.go index e66e01c..f94cd4f 100644 --- a/service/singleton/singleton.go +++ b/service/singleton/singleton.go @@ -12,7 +12,7 @@ import ( "github.com/naiba/nezha/pkg/utils" ) -var Version = "v0.13.13" // !!记得修改 README 中的 badge 版本!! +var Version = "v0.13.14" // !!记得修改 README 中的 badge 版本!! var ( Conf *model.Config