稍微改一下脚本看看。

This commit is contained in:
LamGC 2023-03-27 13:19:48 +08:00
parent 8776c5afbe
commit 086007e04e
Signed by: LamGC
GPG Key ID: 6C5AE2A913941E1D
2 changed files with 3 additions and 1 deletions

View File

@ -6,7 +6,7 @@ USER root
COPY start-agent.sh /usr/local/bin/start.sh
RUN chmod 755 /usr/local/bin/start.sh
ENTRYPOINT [ "/usr/local/bin/start.sh" ]
ENTRYPOINT [ "/bin/bash", "/usr/local/bin/start.sh" ]
RUN apt-get update && apt-get install -y \
ca-certificates \

View File

@ -1,3 +1,5 @@
#!/bin/bash
if [ $(whoami) != "jenkins" ] || [ $(id -u) == "0" ]; then
echo "This script must be run as jenkins"
exit 1