-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathDockerfile
More file actions
21 lines (15 loc) · 753 Bytes
/
Dockerfile
File metadata and controls
21 lines (15 loc) · 753 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
FROM debian:11-slim
ARG NEZHA_VER=0.15.10
ENV domain="" port="5555" secret="" args="--disable-auto-update" platform="" version=""
WORKDIR /usr/local/bin
COPY ./entrypoint.sh /usr/local/bin/
RUN apt-get update &&\
apt-get install -y --no-install-recommends tini wget unzip ca-certificates &&\
rm -rf /var/lib/apt/lists/* &&\
arch=$(uname -m | sed "s#x86_64#amd64#; s#aarch64#arm64#; s#i386#386#") &&\
wget -O ./nezha-agent.zip -t 4 -T 5 "https://github.com/nezhahq/agent/releases/download/v${NEZHA_VER}/nezha-agent_linux_${arch}.zip" &&\
unzip ./nezha-agent.zip &&\
rm -f ./nezha-agent.zip &&\
chmod +x ./entrypoint.sh &&\
chmod +x ./nezha-agent
ENTRYPOINT ["/usr/bin/tini","-g","--","/usr/local/bin/entrypoint.sh"]