Skip to content

Commit 84b0b99

Browse files
authored
No-Root Nezha-Agent (#23)
No-Root Nezha-Agent
1 parent 0d8788e commit 84b0b99

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docker-image/nezha-agent/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ ADD https://github.com/nezhahq/agent/releases/download/$NEZHA_AGENT_VERSION/nezh
66

77
RUN unzip /tmp/nezha-agent_linux_amd64.zip -d /usr/local/bin && rm /tmp/nezha-agent_linux_amd64.zip
88

9+
RUN addgroup -S nezha && adduser -S -D -h /home/nezha -G nezha nezha
10+
USER nezha
11+
WORKDIR /home/nezha
12+
913
ENTRYPOINT ["nezha-agent"]
1014

1115

0 commit comments

Comments
 (0)