|
|
|
FROM debian:stable-slim |
|
|
|
|
|
WORKDIR /app |
|
|
|
|
|
RUN apt-get update && \ |
|
apt-get install -y wget ca-certificates && \ |
|
rm -rf /var/lib/apt/lists/* |
|
|
|
|
|
RUN wget -O nezha-agent.tar.gz https://github.com/naiba/nezha/releases/latest/download/nezha-agent_linux_amd64.tar.gz |
|
|
|
|
|
RUN tar -zxvf nezha-agent.tar.gz && \ |
|
rm nezha-agent.tar.gz |
|
|
|
|
|
RUN chmod +x nezha-agent |
|
|
|
|
|
ENV NEZHA_SERVER="your_panel_server:5555" |
|
ENV NEZHA_KEY="your_agent_key" |
|
ENV NEZHA_TLS="false" |
|
|
|
|
|
CMD ["./nezha-agent", \ |
|
"-s", "${NEZHA_SERVER}", \ |
|
"-p", "${NEZHA_KEY}", \ |
|
"-tls", "${NEZHA_TLS}"] |