From 4d509bbfe72515180414a9e5ab7a8a6c1140158f Mon Sep 17 00:00:00 2001 From: zontreck Date: Sat, 9 Nov 2024 00:42:05 -0700 Subject: [PATCH] Fix entrypoint --- DINDAgent/Dockerfile | 6 ++---- DINDAgent/entrypoint.sh | 8 ++++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/DINDAgent/Dockerfile b/DINDAgent/Dockerfile index 7ced074..810e1fd 100644 --- a/DINDAgent/Dockerfile +++ b/DINDAgent/Dockerfile @@ -3,7 +3,7 @@ FROM git.zontreck.com/ariascreations/buildenvironments:debianbuild ENV DOCKER_AGENT_SECRET NAN ENV DOCKER_USER NAN ENV DOCKER_PASSWORD NAN -ENV HOME /home/builder +ENV HOME /root RUN apt-get update && apt-get upgrade -y @@ -17,10 +17,8 @@ WORKDIR / RUN curl -sO https://ci.zontreck.com/jnlpJars/agent.jar -RUN useradd -m -s /bin/bash builder RUN mkdir /builder -RUN chown builder:builder /builder -USER builder +USER root ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] \ No newline at end of file diff --git a/DINDAgent/entrypoint.sh b/DINDAgent/entrypoint.sh index 4be9899..653046d 100644 --- a/DINDAgent/entrypoint.sh +++ b/DINDAgent/entrypoint.sh @@ -3,10 +3,10 @@ if [ -d /keys ] then echo "Installing SSH Keys..." - mkdir -pv /home/builder/.ssh - cp -v /keys/id_rsa ~/.ssh/ - cp -v /keys/id_rsa.pub ~/.ssh/ - chmod 0600 ~/.ssh/id_rsa + mkdir -pv $HOME/.ssh + cp -v /keys/id_rsa $HOME/.ssh/ + cp -v /keys/id_rsa.pub $HOME/.ssh/ + chmod 0600 $HOME/.ssh/id_rsa sleep 10 fi